Using atlassian sdk with newer confluence versions

Hi community,

I need to develop against a specific recent version of confluence (server/DC), i.e. the new 8.3 release, because we are running into problem with that version, only.

I tried to bump the confluence version in our POM to 8.3.0, however it seems the atlassian SDK toolchain cannot deal with it:

 /D:/jasmine/Documents/yFiles/Graphity/yworks-diagrams-for-confluence/src/main/java/com/yworks/plugins/confluence/helper/PageUtils.java:[3,28] cannot access com.atlassian.bonnie.Searchable
  bad class file: C:\Users\moeller\.m2\repository\com\atlassian\confluence\confluence-bonnie\8.3.0\confluence-bonnie-8.3.0.jar(com/atlassian/bonnie/Searchable.class)
    class file has wrong version 55.0, should be 52.0

because not surprisingly the time for Java 8 is finally over. Unfortunately I also cannot use Java 11, setting the maven.compiler versions to 11 yields:

 Fatal error compiling: invalid target release: 11

again, not surprisingly since the bundled maven is from prehistoric times.

I should add that I’m NOT a maven pro. Has anyone managed to develop against recent confluence versions and can share their knowledge? That would be awesome.

Hi @JasmineMller

in the pom/xml file, keep the following parameters at 1.8

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

Make sure you have Java version 11 installed on your system and check if the SDK correctly detects it with the atlas-version command

ATLAS Version:    8.2.7
ATLAS Home:       /Applications/Atlassian/atlassian-plugin-sdk
ATLAS Scripts:    /Applications/Atlassian/atlassian-plugin-sdk/bin
ATLAS Maven Home: /Applications/Atlassian/atlassian-plugin-sdk/apache-maven
AMPS Version:     8.1.2
--------
Executing: /Applications/Atlassian/atlassian-plugin-sdk/apache-maven/bin/mvn --version -gs /Applications/Atlassian/atlassian-plugin-sdk/apache-maven/conf/settings.xml
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /Applications/Atlassian/atlassian-plugin-sdk/apache-maven
Java version: 11.0.17, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
Default locale: en_PL, platform encoding: UTF-8
OS name: "mac os x", version: "13.3.1", arch: "aarch64", family: "mac"

In addition, make sure that the artifactId is in the correct version, for me it is 8.2.0

<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>jira-maven-plugin</artifactId>

I hope this will help you compile your app correctly

Cheers
Adam

2 Likes

Thank you so much - yes, this did it