Sonar 3.5.1 not working for Java 8 and maven 3.3.9 with war file - sonarqube

We are upgrading and existing project to java 8 and maven 3.3.9 we have sonar 3.5.1, though latest versions of sonar are available we don't want to update sonar since we have done some customization in sonar 3.5.1.
Main thing is that we deploy sonar war in the same tomcat where we
have deployed our project but in new sonar versions war folder is
deleted and they have provided separate sonar server which we don't
want.
So please help me to run sonar 3.5.1 or tell me how can I make war of latest sonar version and deploy it in my own tomcat. I am trying this from last two days and tested with different versions but no success. When using sonar 3.5.1 we are getting below error
[INFO] Sonar version: 3.5.1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.007 s
[INFO] Finished at: 2017-04-26T23:47:34+05:30
[INFO] Final Memory: 24M/218M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project app25apr1: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar failed: A required class was missing while executing org.codehaus.mojo:sonar-maven-plugin:2.0:sonar: org/sonatype/aether/graph/DependencyFilter
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:2.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/ist/innoeye/headStart8Repository/org/codehaus/mojo/sonar-maven-plugin/2.0/sonar-maven-plugin-2.0.jar
[ERROR] urls[1] = file:/home/ist/innoeye/headStart8Repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[2] = file:/home/ist/innoeye/headStart8Repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[3] = file:/home/ist/innoeye/headStart8Repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[4] = file:/home/ist/innoeye/headStart8Repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[5] = file:/home/ist/innoeye/headStart8Repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[6] = file:/home/ist/innoeye/headStart8Repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[7] = file:/home/ist/innoeye/headStart8Repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[8] = file:/home/ist/innoeye/headStart8Repository/org/codehaus/plexus/plexus-utils/2.0.4/plexus-utils-2.0.4.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.sonatype.aether.graph.DependencyFilter

Sonar 3.5.1 is 4 years old. I highly suggest to use latest LTS (5.6.6) which is working with Java 8 and maven 3.3.9.
If you don't want to upgrade due to your customizations, I don't know if you will be able to analyse your projects.

Related

Sonar scanner with Maven and JDK 11

I can make Sonar scanner work with OpenJDK 8 but not with OpenJDK 11.
The Maven command used is:
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -Dsonar.analysis.mode=preview -Dsonar.report.export.path=sonar-report.json -P ci
The build fails with:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project framework-bio: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar: javax/xml/bind/ValidationEventHandler
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:3.4.0.905
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/var/lib/jenkins/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.4.0.905/sonar-maven-plugin-3.4.0.905.jar
[ERROR] urls[1] = file:/var/lib/jenkins/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[2] = file:/var/lib/jenkins/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[3] = file:/var/lib/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
[ERROR] urls[4] = file:/var/lib/jenkins/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.10.0.1189/sonar-scanner-api-2.10.0.1189.jar
[ERROR] urls[5] = file:/var/lib/jenkins/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: javax.xml.bind.ValidationEventHandler
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Is Sonar Scanner expected to work with JDK 11?
I finally found https://github.com/sonargraph/sonar-sonargraph-integration/issues/14
The issue is coming from SonarQube plugin named sonar-sonargraph-integration.
I uninstalled the plugin from SonarQube server and the issue went away.

sonarqube analyzing on java 9

docker sonarqube latest version 6.7.1 broke my maven build on java 9:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project request-work: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar: javax/xml/bind/ValidationEventHandler
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/jenkins/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.4.0.905/sonar-maven-plugin-3.4.0.905.jar
[ERROR] urls[1] = file:/home/jenkins/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[2] = file:/home/jenkins/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[3] = file:/home/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
[ERROR] urls[4] = file:/home/jenkins/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.10.0.1189/sonar-scanner-api-2.10.0.1189.jar
[ERROR] urls[5] = file:/home/jenkins/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : javax.xml.bind.ValidationEventHandler
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
The same configuration on java 8 work perfect.
How to fix it?
On the SonarQube requirements page you can read that SonarQube
only supports Open JDK 8 and Oracle JRE 8. So you need that runtime to run a SonarQube analysis and the SonarQube Website.
The main problem is the current ElasticSearch engine included in the product (support for Java 9 is added in ElasticSearch 6.2,
see also JIRA item SONAR-10574).
You can read for example in this blog that JDK 9 is obselete so
developers need to migrate the code to JDK 10, JDK 11 (later this year) or fallback to JDK 8. See also
this SO question asking for the plans
for the SonarQube 7.x versions, still without an answer. There is a big chance that support for the next Java runtime will be build into
the 7.x version and not in the 6.x versions. You can analyse Java 9 code. See this
SO question for the details.

Magnolia Demo project mvn build failed due to not able to fetch magnolia-setproperty-maven-plugin

I am trying to build the demo application explained in https://documentation.magnolia-cms.com/display/DOCS/Travel+Demo+-+for+developers
I am getting following dependency issue.
Downloading: https://repo.maven.apache.org/maven2/info/magnolia/maven/plugins/magnolia-setproperty-maven-plugin/1.2.1/magnolia-setproperty-maven-plugin-1.2.1.pom
[WARNING] The POM for info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:jar:1.2.1 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/info/magnolia/maven/plugins/magnolia-setproperty-maven-plugin/1.2.1/magnolia-setproperty-maven-plugin-1.2.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Magnolia Travel Demo (parent pom) .................. FAILURE [ 2.141 s]
[INFO] Magnolia Travel Demo Module ........................ SKIPPED
[INFO] Magnolia Travel Tours Module ....................... SKIPPED
[INFO] Magnolia Demo Projects Reactor ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.366 s
[INFO] Finished at: 2016-03-28T13:02:23+13:00
[INFO] Final Memory: 11M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1 or one of its dependencies could not be resolved: Could not find artifact info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:jar:1.2.1 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
Please note Magnolia repo is already added and artifacts are already downloaded from the Magnolia repository, this is not due to Magnolia repo is not added. for some reason it's not trying to download from Magnolia repo, probably mvn tries to download from that first then trying mvn public repo due to some issue on Magnolia repo, Can some one help me to identify what's wrong ?
But this jar is available on Magnolia repo and I have downloaded the jar and installed manually, then I am getting following error,
[ERROR] Failed to execute goal info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1:set-property (currentDate) on project magnolia-travel-demo-parent: Execution currentDate of goal info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1:set-property failed: A required class was missing while executing info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1:set-property: org/apache/commons/lang/StringUtils
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/software-install/repo/info/magnolia/maven/plugins/magnolia-setproperty-maven-plugin/1.2.1/magnolia-setproperty-maven-plugin-1.2.1.jar
[ERROR] urls[1] = file:/C:/software-install/repo/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.commons.lang.StringUtils
[ERROR] -> [Help 1]
Not that you want to hear it, but I suspect that it is indeed a repo problem. You have set repository for normal artifacts, but what you are missing is that what maven is trying to download is plugin.
Look at Maven docu on how to setup plugin repo in your settings.xml, e.g. here (with the slight difference that you want releases and not snapshots).
Also, you might want to check note from Mathias at the bottom of Magnolia Maven setup guide
HTH,
Jan

org/sonar/api/utils/SonarException : Unsupported major.minor version 51.0

after upgrading from 3.3.2 to Sonarqube 5.1.2, my maven build for a project that needs to be built with jdk 1.6 is failing with:
build 03-Dec-2015 19:33:10 [INFO] ------------------------------------------------------------------------
build 03-Dec-2015 19:33:10 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project my_project: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar failed: An API incompatibility was encountered while executing org.codehaus.mojo:sonar-maven-plugin:2.6:sonar: java.lang.UnsupportedClassVersionError: org/sonar/api/utils/SonarException : Unsupported major.minor version 51.0
build 03-Dec-2015 19:33:10 [ERROR] -----------------------------------------------------
build 03-Dec-2015 19:33:10 [ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:2.6
build 03-Dec-2015 19:33:10 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
build 03-Dec-2015 19:33:10 [ERROR] urls[0] = file:/tmp/org/codehaus/mojo/sonar-maven-plugin/2.6/sonar-maven-plugin-2.6.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[1] = file:/tmp/org/apache/maven/shared/maven-dependency-tree/2.1/maven-dependency-tree-2.1.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[2] = file:/tmp/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[3] = file:/tmp/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[4] = file:/tmp/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[5] = file:/tmp/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[6] = file:/tmp/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[7] = file:/tmp/org/codehaus/plexus/plexus-utils/1.5.5/plexus-utils-1.5.5.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[8] = file:/tmp/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[9] = file:/tmp/org/codehaus/sonar/runner/sonar-runner-api/2.4/sonar-runner-api-2.4.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[10] = file:/tmp/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[11] = file:/tmp/com/google/guava/guava/10.0.1/guava-10.0.1.jar
build 03-Dec-2015 19:33:10 [ERROR] urls[12] = file:/tmp/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
build 03-Dec-2015 19:33:10 [ERROR] Number of foreign imports: 1
build 03-Dec-2015 19:33:10 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
build 03-Dec-2015 19:33:10 [ERROR]
build 03-Dec-2015 19:33:10 [ERROR] -----------------------------------------------------
build 03-Dec-2015 19:33:10 [ERROR] -> [Help 1]
seems like a compatibility issue, any ideas?
Pointing to the old sonar it still works fine, pointing to the new one, I get this.
Thanks,
Roberto
As you can read in the "Requirements" page or the "SonarQube 5.0 Upgrade Guide", you need at least Java 7 to run a SonarQube analysis.
You can always build (compile, test, ...etc) your project with Java 6, but then you need to configure your SonarQube analysis to use Java 7 or greater.
SonarQube 5.x requires java 7 to run the server and to run analysis.
It will still analyze projects build with java 6 but you should run the analysis with java 7.
I fell into almost the same problem running my Sonar analysis on Jenkins via maven. At some point a project analysis that worked started to fail while:
SonarQube Server had not changed (version 4.5.6)
Jenkins Job config had not changed (Maven Job configured with JDK 1.7.0.45)
Maven config had not changed
And this is what I got:
org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/sonarsource/scanner/maven/SonarQubeMojo : Unsupported major.minor version 52.0
17:27:29 [ERROR] -----------------------------------------------------
17:27:29 [ERROR] realm = plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1
17:27:29 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
17:27:29 [ERROR] urls[0] = file:/c:/tools/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.1.1/sonar-maven-plugin-3.1.1.jar
17:27:29 [ERROR] urls[1] = file:/c:/tools/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
17:27:29 [ERROR] urls[2] = file:/c:/tools/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
17:27:29 [ERROR] urls[3] = file:/c:/tools/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
17:27:29 [ERROR] urls[4] = file:/c:/tools/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
17:27:29 [ERROR] urls[5] = file:/c:/tools/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
17:27:29 [ERROR] urls[6] = file:/c:/tools/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
17:27:29 [ERROR] urls[7] = file:/c:/tools/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.7/sonar-scanner-api-2.7.jar
17:27:29 [ERROR] urls[8] = file:/c:/tools/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
17:27:29 [ERROR] urls[9] = file:/c:/tools/.m2/repository/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
17:27:29 [ERROR] Number of foreign imports: 1
17:27:29 [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
The issue is caused here by a mismatch of java version between:
Jenkins Job executing with JDK 1.7.x
sonar-maven-plugin version 3.1.1 being compiled with JDK 1.8.x
The version of the plugin was not set explicitly in the pom.xml, so the analysis started to fail when the job took this version of the plugin.
For many reasons, the job JDK could not be upgraded to 1.8, so the version of the sonar-maven-plugin was fixed to 3.0.2.
This is correct, you need java 1.7 version. Make sure you have updated jdk version not the jre.
First verify which env variable to used to pick up jdk version.
javac -version
output:
Picked up _JAVA_OPTIONS: -Xmx512M
javac 1.7.0_80
Go to the command line and follow the below change.
Set JAVA_OPTIONS=C:\Program Files\Java\jdk1.7.0_80
or
Set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_80
set PATH=%JAVA_HOME%\bin;%PATH%

Error in Atlassian SDK

I am currently trying to get started with the Atlassian SDK and I've installed it as it is described in the Atlassian SDK Documentation. But when I'm running a SDK-command, it doesn't work. For example, when I run the command
atlas-run-standalone --product jira
it fails with the following output:
Executing: "C:\Users\XXX\Programme\apache-maven-3.1.1\bin\mvn" com.atlassian.maven.plugins:maven-am
ps-plugin:4.2.20:run-standalone -gs C:\Users\XXX\atlassian-plugin-sdk\apache-maven/conf/settings.xm
l -Dproduct=jira
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-amps-plugin:4.2.20:run-standalone (default-cli) # standalone-pom ---
[INFO] Google Analytics Tracking is enabled to collect AMPS usage statistics.
[INFO] Although no personal information is sent, you may disable tracking by adding <allowGoogleTracking>false
</allowGoogleTracking> to the amps plugin configuration in your pom.xml
[INFO] Sending event to Google Analytics: AMPS:jira - Run Standalone
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.861s
[INFO] Finished at: Thu Apr 24 09:32:47 CEST 2014
[INFO] Final Memory: 16M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-plugin:4.2.20:run-standalone (
default-cli) on project standalone-pom: Execution default-cli of goal com.atlassian.maven.plugins:ma
ven-amps-plugin:4.2.20:run-standalone failed: An API incompatibility was encountered while executing
com.atlassian.maven.plugins:maven-amps-plugin:4.2.20:run-standalone: java.lang.NoSuchMethodError: o
rg.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSe
ssion;
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.atlassian.maven.plugins:maven-amps-plugin:4.2.20
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/XXX/.m2/repository/com/atlassian/maven/plugins/maven-amps-plugin/4
.2.20/maven-amps-plugin-4.2.20.jar
[ERROR] urls[1] = file:/C:/Users/XXX/.m2/repository/com/atlassian/core/atlassian-core/4.0/atlassian
-core-4.0.jar
# more [ERROR] urls[x] = ...
[ERROR] urls[130] = file:/C:/Users/XXX/.m2/repository/org/twdata/maven/mojo-executor/1.5.1/mojo-exe
cutor-1.5.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following arti
cles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Some further information to my machine:
Windows 7 Professional, x64
javac 1.7.0_45
JAVA_HOME is set, %JAVA_HOME%/bin has been added to PATH
And the information responded by the atlas-version command:
ATLAS Version: 4.2.20
ATLAS Home: C:\Users\XXX\atlassian-plugin-sdk
ATLAS Scripts: C:\Users\XXX\atlassian-plugin-sdk\bin
ATLAS Maven Home: C:\Users\XXX\atlassian-plugin-sdk\apache-maven
--------
Executing: "C:\Users\XXX\Programme\apache-maven-3.1.1\bin\mvn" --versi
n-plugin-sdk\apache-maven/conf/settings.xml
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-1
Maven home: C:\Users\XXX\Programme\apache-maven-3.1.1
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_45\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Have you set ATLAS_MVN to use your own installation of Maven? The Atlassian SDK doesn't support Maven 3.1+ in the 4.x releases due to an incompatible change in Maven itself (MNG-5354).
There is a fix (AMPS-1029); until upgrading, use Maven 3.0 or the mvn that's bundled with AMPS.
AMPS 5.0 has now been released (AMPS SDK 5.0.0 Release Notes) with that fix included, and support for Maven 3.1.

Resources