I am trying to generate the graph API token for azure AD using atlassian plugin module in java , I entered the dependencies in the POM file , built the jar , deploy it on confluence it is showing the error ,
Caused by: org.osgi.framework.BundleException: Unable to resolve com.atlassian.tutorial.myConfluenceMacro [306](R 306.0): missing requirement [com.atlassian.tutorial.myConfluenceMacro [306](R 306.0)] osgi.wiring.package; (osgi.wiring.package=com.microsoft.aad.adal4j) Unresolved requirements: [[com.atlassian.tutorial.myConfluenceMacro [306](R 306.0)] osgi.wiring.package; (osgi.wiring.package=com.microsoft.aad.adal4j)] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398) at org.apache.felix.framework.Felix.startBundle(Felix.java:2308) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:992) at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:405)
I have used <scope>provided</scope>
under the dependcies and built the jar but the jar is getting diabled when uploading in confluence manage app section.
below are the dependencies I have tried:
<dependency>
<groupId>com.atlassian.oauth.client</groupId>
<artifactId>atlassian-oauth-client-api</artifactId>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>com.atlassian.oauth.client</groupId>
<artifactId>atlassian-oauth-client-core</artifactId>
<version>1.0.6</version>
</dependency>
the POM file is not allowing me to add these dependencies, similar for the following:
<dependency>
<groupId>com.atlassian.oauth</groupId>
<artifactId>atlassian-oauth2</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>com.atlassian.oauth.client</groupId>
<artifactId>atlassian-oauth-client-api</artifactId>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>com.atlassian.oauth.client</groupId>
<artifactId>atlassian-oauth-client-core</artifactId>
<version>1.0.6</version>
</dependency>
is there any other way to resolve these error in dependencies or any other way to generate graph API token with sdk plugin code .