Class missing error from maven/atlas-run following plugin tutorial

Hi, I’m trying to go through the tutorial, I’ve created the maven project via atlas-create-jira-plugin but when I do the atlas-run it fails with the following:

and excludes "" [INFO] Starting jira on the tomcat8x container on ports 2990 (http), 52963 (rmi) and 8009 (ajp) [INFO] using codehaus cargo v1.4.7 [WARNING] Invalid POM for commons-vfs:commons-vfs:jar:1.0, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.4.7 for container tomcat8x [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 48.469 s [INFO] Finished at: 2017-03-10T14:08:13-05:00 [INFO] Final Memory: 51M/440M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.2.11:run (default-cli) on project myPlugin: Unable to execute mojo: Execution null of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.7:start failed: A required class was missing while executing org.codehaus.cargo:cargo-maven2-plugin:1.4.7:start: org/apache/commons/discovery/resource/ClassLoaders [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>org.codehaus.cargo:cargo-maven2-plugin:1.4.7 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/Users/ericholiphant/.m2/repository/org/codehaus/cargo/cargo-maven2-plugin/1.4.7/cargo-maven2-plugin-1.4.7.jar [ERROR] urls[1] = file:/Users/ericholiphant/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar [ERROR] urls[2] = file:/Users/ericholiphant/.m2/repository/org/apache/maven/maven-archiver/2.4.1/maven-archiver-2.4.1.jar [ERROR] urls[3] = file:/Users/ericholiphant/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0/plexus-archiver-1.0.jar [ERROR] urls[4] = file:/Users/ericholiphant/.m2/repository/org/codehaus/plexus/plexus-io/1.0/plexus-io-1.0.jar [ERROR] urls[5] = file:/Users/ericholiphant/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.13/plexus-interpolation-1.13.jar [ERROR] urls[6] = file:/Users/ericholiphant/.m2/repository/org/codehaus/plexus/plexus-utils/1.4.7/plexus-utils-1.4.7.jar [ERROR] urls[7] = file:/Users/ericholiphant/.m2/repository/org/codehaus/cargo/cargo-core-api-generic/1.4.7/cargo-core-api-generic-1.4.7.jar [ERROR] urls[8] = file:/Users/ericholiphant/.m2/repository/commons-discovery/commons-discovery/0.4/commons-discovery-0.4.jar [ERROR] urls[9] = file:/Users/ericholiphant/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar [ERROR] urls[10] = file:/Users/ericholiphant/.m2/repository/org/codehaus/cargo/cargo-core-api-container/1.4.7/cargo-core-api-container-1.4.7.jar [ERROR] urls[11] = file:/Users/ericholiphant/.m2/repository/org/codehaus/cargo/cargo-core-api-module/1.4.7/cargo-core-api-module-1.4.7.jar [ERROR] urls[12] = file:/Users/ericholiphant/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar [ERROR] urls[13] = file:/Users/ericholiphant/.m2/repository/org/apache/geronimo/specs/geronimo-j2ee-deployment_1.1_spec/1.1/geronimo-j2ee-deployment_1.1_spec-1.1.jar [ERROR] urls[14] = file:/Users/ericholiphant/.m2/repository/org/codehaus/cargo/cargo-documentation/1.4.7/cargo-documentation-1.4.7.jar [ERROR] urls[15] = file:/Users/ericholiphant/.m2/repository/org/codehaus/cargo/cargo-daemon-client/1.4.7/cargo-daemon-client-1.4.7.jar [ERROR] urls[16] = file:/Users/ericholiphant/.m2/repository/org/codehaus/cargo/cargo-core-api-util/1.4.7/cargo-core-api-util-1.4.7.jar [ERROR] urls[17] = file:/Users/ericholiphant/.m2/repository/dom4j/dom4j/1.4/dom4j-1.4.jar [ERROR] urls[18] = file:/Users/ericholiphant/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar [ERROR] urls[19] = file:/Users/ericholiphant/.m2/repository/jaxen/jaxen/1.0-FCS/jaxen-1.0-FCS.jar [ERROR] urls[20] = file:/Users/ericholiphant/.m2/repository/saxpath/saxpath/1.0-FCS/saxpath-1.0-FCS.jar [ERROR] urls[21] = file:/Users/ericholiphant/.m2/repository/msv/msv/20020414/msv-20020414.jar [ERROR] urls[22] = file:/Users/ericholiphant/.m2/repository/relaxngDatatype/relaxngDatatype/20020414/relaxngDatatype-20020414.jar [ERROR] urls[23] = file:/Users/ericholiphant/.m2/repository/isorelax/isorelax/20020414/isorelax-20020414.jar [ERROR] urls[24] = file:/Users/ericholiphant/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar [ERROR] urls[25] = file:/Users/ericholiphant/.m2/repository/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar [ERROR] Number of foreign imports: 1 [ERROR] import: Entry[import from realm ClassRealm[project>com.atlassian.tutorial:myPlugin:1.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]] [ERROR] [ERROR] -----------------------------------------------------: org.apache.commons.discovery.resource.ClassLoaders [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/MojoExecutionException MacBook-Pro:myPlugin ericholiphant$ atlas-create-jira-plugin

1 Like

Check the IDE preferences-maven-installations.
Run the command “atlas-mvn eclipse:eclipse” to generate Eclipse configuration files in the plugin.
Check plugin dependency in the pom.xml file.

I’m actually just running from the command line at this point. Do I still need to generate the eclipse config? What am I checking for in terms of the plugin dependency?

Maven home: /usr/share/atlassian-plugin-sdk-6.2.14/apache-maven-3.2.1

I just created an addon with “atlas-create-jira-plugin”, and built it using the sdk above. It downloaded jira 7.2.2, the build JIRA launched and the build was finally reported a success.

Have you modified your pom.xml at all?

I confirm it works for me as well. Just run: atlas-create-jira-plugin and then atlas-run. As result I got JIRA Core 7.3.3.
atlas-version prints:

ATLAS Version:    6.2.9
ATLAS Home:       /usr/share/atlassian-plugin-sdk-6.2.9
ATLAS Scripts:    /usr/share/atlassian-plugin-sdk-6.2.9/bin
ATLAS Maven Home: /usr/share/atlassian-plugin-sdk-6.2.9/apache-maven-3.2.1
AMPS Version:     6.2.6
--------
Executing: /usr/share/atlassian-plugin-sdk-6.2.9/apache-maven-3.2.1/bin/mvn --version -gs /usr/share/atlassian-plugin-sdk-6.2.9/apache-maven-3.2.1/conf/settings.xml
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T11:37:52-06:00)
Maven home: /usr/share/atlassian-plugin-sdk-6.2.9/apache-maven-3.2.1
Java version: 1.8.0_101, vendor: Oracle Corporation
Java home: /opt/jdk1.8.0_101/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-514.10.2.el7.x86_64", arch: "amd64", family: "unix"