AMPS 8.3.1 build failure

Hi,
I am getting below error -

Execution default-unit-test of goal com.atlassian.maven.plugins:jira-maven-plugin:8.3.1:unit-test failed: An API incompatibility was encountered while executing com.atlassian.maven.plugins:jira-maven-plugin:8.3.1:unit-test: java.lang.NoSuchMethodError: org.codehaus.plexus.util.xml.Xpp3Dom.getInputLocation()Ljava/lang/Object

Whole error -

Execution default-unit-test of goal com.atlassian.maven.plugins:jira-maven-plugin:8.3.1:unit-test failed: An API incompatibility was encountered while executing com.atlassian.maven.plugins:jira-maven-plugin:8.3.1:unit-test: java.lang.NoSuchMethodError: org.codehaus.plexus.util.xml.Xpp3Dom.getInputLocation()Ljava/lang/Object;
[ERROR] -----------------------------------------------------
[ERROR] realm =    extension>com.atlassian.maven.plugins:jira-maven-plugin:8.3.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/maven/plugins/jira-maven-plugin/8.3.1/jira-maven-plugin-8.3.1.jar
[ERROR] urls[1] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/maven/archetypes/jira-plugin-archetype/8.3.1/jira-plugin-archetype-8.3.1.jar
[ERROR] urls[2] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/maven/plugins/amps-maven-plugin/8.3.1/amps-maven-plugin-8.3.1.jar
[ERROR] urls[3] = file:/Users/saurabhgupta/.m2/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
[ERROR] urls[4] = file:/Users/saurabhgupta/.m2/repository/dom4j/dom4j/1.6.1-atlassian-3/dom4j-1.6.1-atlassian-3.jar
[ERROR] urls[5] = file:/Users/saurabhgupta/.m2/repository/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar
[ERROR] urls[6] = file:/Users/saurabhgupta/.m2/repository/biz/aQute/bnd/biz.aQute.bndlib/5.3.0/biz.aQute.bndlib-5.3.0.jar
[ERROR] urls[7] = file:/Users/saurabhgupta/.m2/repository/junit/junit/4.13.2/junit-4.13.2.jar
[ERROR] urls[8] = file:/Users/saurabhgupta/.m2/repository/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.jar
[ERROR] urls[9] = file:/Users/saurabhgupta/.m2/repository/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar
[ERROR] urls[10] = file:/Users/saurabhgupta/.m2/repository/org/apache/ant/ant/1.10.11/ant-1.10.11.jar
[ERROR] urls[11] = file:/Users/saurabhgupta/.m2/repository/org/apache/ant/ant-launcher/1.10.11/ant-launcher-1.10.11.jar
[ERROR] urls[12] = file:/Users/saurabhgupta/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[13] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/maven-builder-support/3.8.2/maven-builder-support-3.8.2.jar
[ERROR] urls[14] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/resolver/maven-resolver-util/1.6.3/maven-resolver-util-1.6.3.jar
[ERROR] urls[15] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.3.4/maven-shared-utils-3.3.4.jar
[ERROR] urls[16] = file:/Users/saurabhgupta/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[17] = file:/Users/saurabhgupta/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.4/org.eclipse.sisu.inject-0.3.4.jar
[ERROR] urls[18] = file:/Users/saurabhgupta/.m2/repository/com/google/inject/guice/4.2.2/guice-4.2.2-no_aop.jar
[ERROR] urls[19] = file:/Users/saurabhgupta/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[20] = file:/Users/saurabhgupta/.m2/repository/com/google/guava/guava/30.1.1-jre/guava-30.1.1-jre.jar
[ERROR] urls[21] = file:/Users/saurabhgupta/.m2/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
[ERROR] urls[22] = file:/Users/saurabhgupta/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
[ERROR] urls[23] = file:/Users/saurabhgupta/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
[ERROR] urls[24] = file:/Users/saurabhgupta/.m2/repository/org/checkerframework/checker-qual/3.8.0/checker-qual-3.8.0.jar
[ERROR] urls[25] = file:/Users/saurabhgupta/.m2/repository/com/google/errorprone/error_prone_annotations/2.5.1/error_prone_annotations-2.5.1.jar
[ERROR] urls[26] = file:/Users/saurabhgupta/.m2/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar
[ERROR] urls[27] = file:/Users/saurabhgupta/.m2/repository/org/codehaus/plexus/plexus-component-annotations/2.1.0/plexus-component-annotations-2.1.0.jar
[ERROR] urls[28] = file:/Users/saurabhgupta/.m2/repository/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
[ERROR] urls[29] = file:/Users/saurabhgupta/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.25/plexus-interpolation-1.25.jar
[ERROR] urls[30] = file:/Users/saurabhgupta/.m2/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
[ERROR] urls[31] = file:/Users/saurabhgupta/.m2/repository/jaxen/jaxen/1.2.0-atlassian-2/jaxen-1.2.0-atlassian-2.jar
[ERROR] urls[32] = file:/Users/saurabhgupta/.m2/repository/org/ow2/asm/asm/9.2/asm-9.2.jar
[ERROR] urls[33] = file:/Users/saurabhgupta/.m2/repository/org/codehaus/plexus/plexus-archiver/3.7.0/plexus-archiver-3.7.0.jar
[ERROR] urls[34] = file:/Users/saurabhgupta/.m2/repository/org/codehaus/plexus/plexus-io/3.1.0/plexus-io-3.1.0.jar
[ERROR] urls[35] = file:/Users/saurabhgupta/.m2/repository/org/iq80/snappy/snappy/0.4/snappy-0.4.jar
[ERROR] urls[36] = file:/Users/saurabhgupta/.m2/repository/org/tukaani/xz/1.8/xz-1.8.jar
[ERROR] urls[37] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/maven-archiver/2.6/maven-archiver-2.6.jar
[ERROR] urls[38] = file:/Users/saurabhgupta/.m2/repository/org/apache/commons/commons-compress/1.21/commons-compress-1.21.jar
[ERROR] urls[39] = file:/Users/saurabhgupta/.m2/repository/commons-validator/commons-validator/1.7/commons-validator-1.7.jar
[ERROR] urls[40] = file:/Users/saurabhgupta/.m2/repository/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar
[ERROR] urls[41] = file:/Users/saurabhgupta/.m2/repository/commons-digester/commons-digester/2.1/commons-digester-2.1.jar
[ERROR] urls[42] = file:/Users/saurabhgupta/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
[ERROR] urls[43] = file:/Users/saurabhgupta/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar
[ERROR] urls[44] = file:/Users/saurabhgupta/.m2/repository/org/jdom/jdom/1.1.3/jdom-1.1.3.jar
[ERROR] urls[45] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/amps/plugin-module-codegen-maven-client/8.3.1/plugin-module-codegen-maven-client-8.3.1.jar
[ERROR] urls[46] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/amps/plugin-module-codegen-api/8.3.1/plugin-module-codegen-api-8.3.1.jar
[ERROR] urls[47] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/amps/plugin-module-codegen-engine/8.3.1/plugin-module-codegen-engine-8.3.1.jar
[ERROR] urls[48] = file:/Users/saurabhgupta/.m2/repository/log4j/log4j/1.2.17-atlassian-13/log4j-1.2.17-atlassian-13.jar
[ERROR] urls[49] = file:/Users/saurabhgupta/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0/plexus-interactivity-api-1.0.jar
[ERROR] urls[50] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/maven/archetypes/refapp-plugin-archetype/8.3.1/refapp-plugin-archetype-8.3.1.jar
[ERROR] urls[51] = file:/Users/saurabhgupta/.m2/repository/com/dmurph/JGoogleAnalyticsTracker/1.2.1-atlassian/JGoogleAnalyticsTracker-1.2.1-atlassian.jar
[ERROR] urls[52] = file:/Users/saurabhgupta/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.12.5/jackson-databind-2.12.5.jar
[ERROR] urls[53] = file:/Users/saurabhgupta/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.12.5/jackson-annotations-2.12.5.jar
[ERROR] urls[54] = file:/Users/saurabhgupta/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.12.5/jackson-core-2.12.5.jar
[ERROR] urls[55] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/amps/standalone/8.3.1/standalone-8.3.1.pom
[ERROR] urls[56] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/plugins/atlassian-plugins-osgi-testrunner/2.0.2/atlassian-plugins-osgi-testrunner-2.0.2.jar
[ERROR] urls[57] = file:/Users/saurabhgupta/.m2/repository/org/apache/wink/wink-client/1.1.3-incubating/wink-client-1.1.3-incubating.jar
[ERROR] urls[58] = file:/Users/saurabhgupta/.m2/repository/org/apache/wink/wink-common/1.1.3-incubating/wink-common-1.1.3-incubating.jar
[ERROR] urls[59] = file:/Users/saurabhgupta/.m2/repository/org/apache/geronimo/specs/geronimo-annotation_1.1_spec/1.0/geronimo-annotation_1.1_spec-1.0.jar
[ERROR] urls[60] = file:/Users/saurabhgupta/.m2/repository/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar
[ERROR] urls[61] = file:/Users/saurabhgupta/.m2/repository/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar
[ERROR] urls[62] = file:/Users/saurabhgupta/.m2/repository/com/sun/xml/bind/jaxb-impl/2.3.5/jaxb-impl-2.3.5.jar
[ERROR] urls[63] = file:/Users/saurabhgupta/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar
[ERROR] urls[64] = file:/Users/saurabhgupta/.m2/repository/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar
[ERROR] urls[65] = file:/Users/saurabhgupta/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar
[ERROR] urls[66] = file:/Users/saurabhgupta/.m2/repository/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar
[ERROR] urls[67] = file:/Users/saurabhgupta/.m2/repository/com/atlassian/upm/upm-api/2.15/upm-api-2.15.jar
[ERROR] urls[68] = file:/Users/saurabhgupta/.m2/repository/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar
[ERROR] urls[69] = file:/Users/saurabhgupta/.m2/repository/com/google/javascript/closure-compiler/v20210302/closure-compiler-v20210302.jar
[ERROR] urls[70] = file:/Users/saurabhgupta/.m2/repository/com/yahoo/platform/yui/yuicompressor/2.4.8/yuicompressor-2.4.8.jar
[ERROR] urls[71] = file:/Users/saurabhgupta/.m2/repository/rhino/js/1.7R2/js-1.7R2.jar
[ERROR] urls[72] = file:/Users/saurabhgupta/.m2/repository/commons-codec/commons-codec/1.15/commons-codec-1.15.jar
[ERROR] urls[73] = file:/Users/saurabhgupta/.m2/repository/com/googlecode/htmlcompressor/htmlcompressor/1.5.2/htmlcompressor-1.5.2.jar
[ERROR] urls[74] = file:/Users/saurabhgupta/.m2/repository/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar
[ERROR] urls[75] = file:/Users/saurabhgupta/.m2/repository/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar
[ERROR] urls[76] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/archetype/archetype-common/3.2.0/archetype-common-3.2.0.jar
[ERROR] urls[77] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/archetype/archetype-catalog/3.2.0/archetype-catalog-3.2.0.jar
[ERROR] urls[78] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/archetype/archetype-descriptor/3.2.0/archetype-descriptor-3.2.0.jar
[ERROR] urls[79] = file:/Users/saurabhgupta/.m2/repository/org/apache/ivy/ivy/2.5.0/ivy-2.5.0.jar
[ERROR] urls[80] = file:/Users/saurabhgupta/.m2/repository/net/sourceforge/jchardet/jchardet/1.0/jchardet-1.0.jar
[ERROR] urls[81] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/shared/maven-invoker/3.0.1/maven-invoker-3.0.1.jar
[ERROR] urls[82] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/shared/maven-artifact-transfer/0.12.0/maven-artifact-transfer-0.12.0.jar
[ERROR] urls[83] = file:/Users/saurabhgupta/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/3.0.1/maven-common-artifact-filters-3.0.1.jar
[ERROR] urls[84] = file:/Users/saurabhgupta/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[85] = file:/Users/saurabhgupta/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[86] = file:/Users/saurabhgupta/.m2/repository/org/codehaus/plexus/plexus-velocity/1.2/plexus-velocity-1.2.jar
[ERROR] urls[87] = file:/Users/saurabhgupta/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
[ERROR] urls[88] = file:/Users/saurabhgupta/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] urls[89] = file:/Users/saurabhgupta/.m2/repository/org/springframework/spring-jdbc/5.3.10/spring-jdbc-5.3.10.jar
[ERROR] urls[90] = file:/Users/saurabhgupta/.m2/repository/org/springframework/spring-beans/5.3.10/spring-beans-5.3.10.jar
[ERROR] urls[91] = file:/Users/saurabhgupta/.m2/repository/org/springframework/spring-core/5.3.10/spring-core-5.3.10.jar
[ERROR] urls[92] = file:/Users/saurabhgupta/.m2/repository/org/springframework/spring-jcl/5.3.10/spring-jcl-5.3.10.jar
[ERROR] urls[93] = file:/Users/saurabhgupta/.m2/repository/org/springframework/spring-tx/5.3.10/spring-tx-5.3.10.jar
[ERROR] urls[94] = file:/Users/saurabhgupta/.m2/repository/org/twdata/maven/mojo-executor/2.3.2/mojo-executor-2.3.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------

Can anyone guide me on how to debug and resolve this error.
Thanks
Saurabh

1 Like

Hi @saurabh.gupta1233 ,

This problem is most likely caused by a maven version older than 3.6.3 which became required starting from AMPS 8.3.0.

You should be able to resolve this by setting the ATLAS_MVN environment variable to the never maven version as explained here: Changing the default Maven version

Can you try and let us know?

There are some more details about the version compatibility in the AMPS release notes: Announcing AMPS 8.3.1

Cheers,
Caterina

Are you planning to make a new release of Atlassian SDK with an updated Maven version?

5 Likes

After completing the instructions outline here most of it seems to work, I am able to build my plugin but I’m having issues with the commands atlas-debug and atlas-package. On these 2 commands I get the following error:

{{ Unresolveable build extension: Plugin com.atlassian.maven.plugins:jira-maven-plugin:8.3.1 or one of its dependencies could not be resolved: Failure to find com.atlassian.maven.plugins:jira-maven-plugin:jar:8.3.1 in Central Repository: was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced → [Help 2]
[ERROR] Unknown packaging: atlassian-plugin @ line 14, column 16

Can anyone please help?

CC: @m.herrmann

1 Like

@ccurti Any plans to release an SDK version with a compatible maven version?

2 Likes

@ccurti this is bugging us too. Isn’t the SDK kind of broken if the packaged Maven version is not compatible with the SDK itself?

2 Likes

Hi @boris @tbinna,

The team working on the SDK is aware of this and I’ve been raising this request now: Log in with Atlassian account

Thanks,
Caterina

2 Likes

@ccurti may I ask if there is any solution for the issue reported by @PhaniGandrakota above? I am facing the same issue after changing to a new Maven version (in my case atlas-run does not work). Does this have to do with Maven global settings not being passed to the command execution?

I can see that atlas-version prints Executing: /usr/local/bin/mvn --version -gs /usr/local/Cellar/atlassian-plugin-sdk/8.2.7/libexec/apache-maven-3.5.4/conf/settings.xml . However, I do not see this when running atlas-run. It seems atlas-run does not know about the Atlassian Maven repos and tries to resolve from Central Repository:.

Hi @tbinna,
came across the same problem, just in case: In some atlas-* scripts, atlas-run being one of them, there is a call to %MAVEN_EXECUTABLE% without adding %MVN_PARAMS%. Add %MVN_PARAMS% makes it work.

1 Like