Which AMPS version to use?

TLDR; Never update AMPS and Atlassian SDK to the latest versions. Choose wisely which versions are compatible with your target Jira/Confluence/… versions.

The same question I asked myself a few months ago. And after a thorough research with many tries, tests, and failures, I found that the most suitable AMPS plugin version and the related dev stack for both current (August 2024) LTS versions of Jira 9.12 and Confluence 8.5 is as follows:

<properties>
    <jira.version>9.12.12</jira.version>
    <confluence.version>8.5.11</confluence.version>
    <amps.version>8.11.2</amps.version>
    
    <atlassian-plugins-osgi-bridge.version>7.1.9</atlassian-plugins-osgi-bridge.version>
    <osgi.javaconfig.version>0.6.0</osgi.javaconfig.version>
    <jsr311api.version>1.1.1</jsr311api.version>
    <jackson.version>1.9.14-atlassian-6</jackson.version>
    <testrunner.version>2.0.3</testrunner.version>
    <junit.version>4.13.2</junit.version>
    <felix.version>7.0.5</felix.version>
    <spring.version>5.3.34</spring.version>
    <gson.version>2.10.1</gson.version>

    <!-- Java 17 workaround for some Maven plugins -->
    <!-- See for details: https://confluence.atlassian.com/jiracore/java-17-runtime-opens-and- exports-arguments-1188413810.html -->
    <jvm17.opens />
</properties>

<dependencies>
    <!-- Spring Java Config -->
    <dependency>
        <groupId>com.atlassian.plugins</groupId>
        <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
        <version>${osgi.javaconfig.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.felix</groupId>
        <artifactId>org.apache.felix.framework</artifactId>
        <version>${felix.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${spring.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
        <scope>provided</scope>
    </dependency>
    
    <dependency>
        <groupId>com.atlassian.plugins</groupId>
        <artifactId>atlassian-plugins-osgi-bridge</artifactId>
        <version>${atlassian-plugins-osgi-bridge.version}</version>
        <scope>provided</scope>
    </dependency>

    <!-- TestRunner -->
    <dependency>
        <groupId>com.atlassian.plugins</groupId>
        <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
        <version>${testrunner.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>jsr311-api</artifactId>
        <version>${jsr311api.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>${gson.version}</version>
        <scope>provided</scope>
    </dependency>

    <!-- Testing -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.version}</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<profiles>
    <!-- Java 17 workaround for some Maven plugins -->
    <!-- See for details: https://confluence.atlassian.com/jiracore/java-17-runtime-opens-and-exports-arguments-1188413810.html -->
    <profile>
        <id>jvm17</id>
        <activation>
            <jdk>17</jdk>
        </activation>
        <properties>
            <jvm17.opens>
                --add-opens=java.base/sun.nio.cs=ALL-UNNAMED
                --add-opens=java.base/java.nio.charset=ALL-UNNAMED
                --add-opens=java.base/java.lang.ref=ALL-UNNAMED
                --add-opens=java.base/java.lang=ALL-UNNAMED
                --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
                --add-opens=java.base/java.util=ALL-UNNAMED
                --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
                --add-opens=java.base/java.io=ALL-UNNAMED
                --add-opens=java.management/javax.management=ALL-UNNAMED
                --add-opens=java.desktop/sun.font=ALL-UNNAMED
                --add-opens=java.base/sun.reflect.generics.parser=ALL-UNNAMED
                --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED
                --add-opens=java.base/java.time=ALL-UNNAMED
                --add-exports=java.base/sun.util.calendar=ALL-UNNAMED
                --add-exports=java.base/sun.security.action=ALL-UNNAMED
                --add-exports=java.xml/jdk.xml.internal=ALL-UNNAMED
            </jvm17.opens>
        </properties>
        <build>
            <pluginManagement>
                <plugins>
                    <!-- Workaround to avoid InaccessibleObjectException when running `integration-test` and `remote-test` in console -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.22.2</version>
                        <configuration>
                            <argLine>${jvm17.opens}</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
    </profile>
</profiles>

Note 1: This was tested on Atlassian Plugin SDK 8.2.10.

Atlassian Plugin SDK 8.2.10 is not available as an installation package for Mac OS, Windows, Linux. You can find it only as Atlassian Plugin SDK - TGZ at: Atlassian Marketplace

Note 2: Java 17 hack is still needed because Atlassian has added not all of the required JVM options. There are some of the options on the list required for testing. To be honest, testing of Jira/Confluence is a separate science with many caveats. I’ve recently shared some of my proven testing experience in another posts.

What’s wrong with the other AMPS versions?

AMPS Troubles
8.17.1 Dependency com.atlassian.platform:license-backdo or-plugin:jar:1.0.3 is not available in the public Maven repo.
8.16.0 Provided DevToolBox does not work in Jira 9.12 LTS
8.15.4 Provided DevToolBox does not work in Jira 9.12 LTS
8.14.3 Provided DevToolBox does not work in Jira 9.12 LTS
8.13.5 Is not compatible with Confluence 8.5 LTS. It requires Confluence 8.6.1+
8.12.4 Is not compatible with Confluence 8.5 LTS. It requires Confluence 8.6.1+

Comparison table of the AMPS and Atlassian product versions compatibility

The table below contains minimum supported versions of the Atlassian products and Platform + used versions of Test Runner and Groovy.

AMPS Release POM Jira Confluence Bitbucket Bamboo FishEye / Crucible Crowd Clover plugin.testrunner.version Platform Version Groovy version
8.9.2 pom 8.5.11 7.1.2 6.7.5 8.0.4 4.8.7-20210224094345 5.1.2 3.1.7 2.0.2 5.0.0 -
8.10.4 pom 8.5.11 7.1.2 6.7.5 8.0.4 4.8.7-20210224094345 5.1.2 3.1.7 2.0.3 5.0.32 -
8.11.2 pom 9.11.0-QR-20230802122956 7.1.2 6.7.5 8.0.4 4.8.7-20210224094345 5.1.5 3.1.7 2.0.3 5.0.32 -
8.12.4 pom 9.11.0-QR-20230802122956 8.6.1 6.7.5 9.2.7 4.9.0-20230919145634 5.2.2 3.1.7 2.0.4 5.0.32 4.0.12
8.13.5 pom 9.11.0-QR-20230802122956 8.6.1 6.7.5 9.2.7 4.9.0-20230919145634 5.2.2 3.1.7 2.0.4 5.0.32 4.0.12
8.14.3 pom 9.11.0-QR-20230802122956 8.6.1 6.7.5 9.2.11 4.9.0-20230919145634 5.2.2 3.1.7 2.0.5 5.0.32 4.0.19
8.15.4 pom 9.11.0-QR-20230802122956 8.6.1 6.7.5 9.2.11 4.9.0-20230919145634 5.2.2 3.1.7 2.0.5 6.0.42 4.0.19
8.16.0 pom 9.11.0-QR-20230802122956 8.6.1 6.7.5 9.2.11 4.9.0-20230919145634 5.2.2 3.1.7 2.0.5 6.0.42 4.0.19
8.17.1 pom 9.11.0-QR-20230802122956 8.6.1 6.7.5 9.2.11 4.9.0-20230919145634 5.2.2 3.1.7 2.0.5 6.0.42 4.0.19

Note 1: AMPS 8.14.3+ requires Atlassian Plugin SDK to 8.2.10, because the previous versions of the SDK have errors with Maven and generating effective POM. More info on this matter is here: Bamboo Data Center 10.0 Early Access Program release - #7 by sopel.

Note 2: Don’t blindly upgrade Atlassian Plugin SDK to the highest versions. Always check compatible versions of your products in the SDK release description.

Note 3: Sometimes upgrade affects testing tools. So, after upgrading AMPS or SDK always check not only that atlas-mvn _product_:run works but in addition that:

  • Wired integration tests run with atlas-mvn _product_:remote-test
  • Web tests (functional, accetpance, e2e) run with atlas-mvn _product_:integration-test

P.S.
I wish you all less tinkering with dependency management and more valuable results for your business.

2 Likes