Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

maven-amps-plugin:4.2.20:copy-bundled-dependencies: java.lang.NoSuchMethodError

Jeff Klein June 10, 2014

I am not able to run any atlas-* commands presently. I did notice that maven downloaded a bunch of new dependencies, which I thought was weird as my dependencies haven't changed in months. The complete error message is:

[INFO] --- maven-amps-plugin:4.2.20:copy-bundled-dependencies (default-copy-bundled-dependencies) @ basics ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.935 s
[INFO] Finished at: 2014-06-11T11:17:00-08:00
[INFO] Final Memory: 30M/570M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-plugin:4.2.20:copy-bundled-dependencies (default-copy-bundled-dependencies) on project basics: Execution default-copy-bundled-dependencies of goal com.atlassian.maven.plugins:maven-amps-plugin:4.2.20:copy-bundled-dependencies failed: An API incompatibility was encountered while executing com.atlassian.maven.plugins:maven-amps-plugin:4.2.20:copy-bundled-dependencies: java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;

 

Is anyone else experiencing this issue? Any thoughts would be appreciated.
Thanks,
Jeff Klein

6 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

13 votes
Answer accepted
Silviu Burcea
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 16, 2014

I have encountered the same problem a couple of times by now. The problem is not related to Amps / Atlassian SDK version, the problem is about Amps / Maven version. Here is how to solve it:

Maven 2 ? Use Amps 4.2.20 version

Maven 3 ? Use Amps 5.x (the latest version, at the moment of writing, is 5.0.4) version

Nhat Tran
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2014

Thanks. this really saved my day.

Tobias Kloht November 20, 2014

This is clearly the correct answer, thanks!

Silviu Burcea
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2014

I am glad I was able to help you guys. Cheers!

Garima Bajpai May 17, 2015

Thanks for the answer! Cheers!

21 votes
Jeff Klein June 10, 2014

I found the answer! Apparently amps.version in the pom.xml needs to match the version of the SDK (which I recently updated via yum to 5.0.2. Here is the diff:

<properties>
    <jira.version>6.2.3</jira.version>
    <jira.data.version>6.2.3</jira.data.version>
-    <amps.version>4.2.20</amps.version>
+    <amps.version>5.0.2</amps.version>
</properties>
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2014

Thanks a lot, this saved my day.

Jayashree Shetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2014

I am still getting this error Jeff even after changing the amps version.

Tobias Kloht November 20, 2014

This is not the correct answer, changing amps version just fixed your problem by accident - see Silviu Burceas answer below. You probably updated your maven installation to 3, which needs amps 5.x. SDK and amps do not need to match versions, in fact i used the latest sdk with an older amps version for months because of some problems with the then most recent amps version.

Silviu Burcea
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2014

It was indeed a coincidence for him: he had mvn 3 installed, so this fixed his issue but it was clearly not related to SDK version.

Jeff Klein November 20, 2014

FWIW, I am (and was) using the maven that comes with the SDK. I believe I may have upgraded the SDK and inadvertently bumped my mvn version from 2.x to 3.x. Thus it makes sense that I had to bump amps.version in my project pom to match the mvn version as per Silviu's comment below. $ atlas-mvn --version Executing: /usr/share/atlassian-plugin-sdk-5.0.4/apache-maven-3.2.1/bin/mvn -gs /usr/share/atlassian-plugin-sdk-5.0.4/apache-maven-3.2.1/conf/settings.xml --version Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T09:37:52-08:00) Maven home: /usr/share/atlassian-plugin-sdk-5.0.4/apache-maven-3.2.1 Java version: 1.7.0_51, vendor: Oracle Corporation Java home: /usr/java/jdk1.7.0_51/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.16.6-200.fc20.x86_64", arch: "amd64", family: "unix"

Silviu Burcea
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2014

SDK 5.0.0 Moved to Maven 3.2.1. Dropped Maven 2.x and Maven 3.0.x according to the docs.

hoang-atlas May 26, 2015

it saved my day :D

1 vote
Gerd Aschemann July 9, 2014

I think this should be covered by the SDK by setting amps.version as a Maven property in the "atlas-mvn" script ...

0 votes
carvo November 20, 2014

Hi everyone.

I'm trying to build the jira-git-plugin (https://github.com/mteodori/jira-git-plugin) but I'm getting the following error: 

[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-jira-plugin:3.9.1:copy-bundled-dependencies (
default-copy-bundled-dependencies) on project jira-git-plugin: Execution default-copy-bundled-dependencies of
goal com.atlassian.maven.plugins:maven-jira-plugin:3.9.1:copy-bundled-dependencies failed: An API incompatibility was encountered while executing com.atlassian.maven.plugins:maven-jira-plugin:3.9.1:copy-bundled-dependencies: java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/
aether/RepositorySystemSession;

Is this related?

BTW, the "helloworld" from "atlastutorial" doesn't work either.

Thanks in advance.

Silviu Burcea
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2014

Yes, they are related, see my answer to update the maven-jira-version according to your maven version.

carvo November 21, 2014

Sorry for the newbie question, but I saw your answer and run "atlas-version" (btw, I dont have any maven 2.x in my PC and I change my variable M2_HOME to point to "atlas maven") : ATLAS Version: 5.0.4 Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T15:37:52-03:00) ... I dont know what Im doing wrong.... Thx again

Tobias Kloht November 21, 2014

I'm not 100% sure because your pom is structured a bit differrent from what i am used to, but I think the version of the maven-jira-plugin in <build><plugins>... in the pom.xml is the amps version, so i'd try changing that to 5.04 for example.

carvo November 21, 2014

So so so so so sorry... Too many projects and pom files that I misplaced the right configuration (some uses properties others not). Thanks a lot!

Silviu Burcea
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 21, 2014

You need 'mvn -version' to figure out what to use for amps.version. It doesn't matter the SDK(atlas) version. If your mvn command points to maven bundled inside Atlassian SDK(maven 3), you need 5.0.4 instead of 3.9.1 as amps.version.

carvo November 24, 2014

Thanks for you both, was completely my mistake. I need to pay more attention. Thx again, Ricardo.

OdedMozesh April 25, 2016

Hi, 

As above, when I run the atlas-run on the the helloworld project and project I cloned from "https://bitbucket.org/atlassian_tutorial/jira-menu-items-plugin.git", I get:

[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.atlassian.plugins.tutorial:jira-menu-items:1.0-SNAPSHO
T (C:\jira\tutorial\my-jira-menu-items-plugin\jira-menu-items\pom.xml) has 2 err
ors
[ERROR] Unresolveable build extension: Plugin com.atlassian.maven.plugins:ma
ven-jira-plugin:6.2.3 or one of its dependencies could not be resolved: Failure
to find com.atlassian.maven.plugins:maven-jira-plugin:jar:6.2.3 in http://repo.m
aven.apache.org/maven2 was cached in the local repository, resolution will not b
e reattempted until the update interval of central has elapsed or updates are fo
rced -> [Help 2]
[ERROR] Unknown packaging: atlassian-plugin @ line 19, column 16
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException

 

My Maven is:

C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.4\apache-maven-3.2.1\bin>mvn
-version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T19:37:5
2+02:00)
Maven home: C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.4\apache-maven-3.
2.1\bin\..
Java version: 1.8.0_102-ea, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_102\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.4\apache-maven-3.2.1\bin>mvn
-version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T19:37:5
2+02:00)
Maven home: C:\Applications\Atlassian\atlassian-plugin-sdk-6.2.4\apache-maven-3.
2.1\bin\..
Java version: 1.8.0_102-ea, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_102\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
 

 

Need help )-:

0 votes
Jeff Klein June 10, 2014

Also FWIW, the versions I have in my pom are as follows:

&lt;properties&gt;
    &lt;jira.version&gt;6.2.3&lt;/jira.version&gt;
    &lt;jira.data.version&gt;6.2.3&lt;/jira.data.version&gt;
    &lt;amps.version&gt;4.2.20&lt;/amps.version&gt;
&lt;/properties&gt;
0 votes
Jeff Klein June 10, 2014

I painted with too broad a stroke when I said that all atlas-* commands are broken. Some work, but key ones like atlas-compile/atlas-run/atlas-debug are broken.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events