Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

content-package-maven-plugin dependency Issue

Avatar

Level 4

Hi All,

I am building new project structure based on AEM 6.0 on windows and following this wiki http://docs.adobe.com/docs/en/aem/6-0/develop/dev-tools/ht-projects-maven.html.

  1. Created structure using this command and got two modules content and bundle along with pom.xml
    mvn -Padobe-public archetype:generate \
        -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ \
        -DarchetypeGroupId=com.day.jcr.vault \
        -DarchetypeArtifactId=multimodule-content-package-archetype \
        -DarchetypeVersion=1.0.2d
  2. M2_HOME and MVEN_HOME is set using maven 3.3.1 and JDK 7 and also using Adobe Nexus Repository and setting.xml is updated  that points to Adobe Repo and pluginGroups in setting.xml  has entry for com.day.jcr.vault.
  3. Parent pom .xml and other child xml are exactly like the one posted in Adobe wiki.
  4. After this when i run very basic command "mvn clean install" it gives this error.
     

***************************************************************************************************************************************

[INFO] xyzWorks Bundle ............................... SUCCESS [  3.006 s]
[INFO] xyzWorks Package .............................. FAILURE [  0.736 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.645 s
[INFO] Finished at: 2015-03-18T18:02:06-04:00
[INFO] Final Memory: 20M/314M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.23:package (default-package) on project xyzworkscontent: Execution default-package of goal com.day.jcr.vault:cont
ent-package-maven-plugin:0.0.23:package failed: A required class was missing while executing com.day.jcr.vault:content-package-maven-plugin:0.0.23:package: org/slf4j/helpers/MarkerIgnoringBase
[ERROR] -----------------------------------------------------
[ERROR] realm =    extension>com.day.jcr.vault:content-package-maven-plugin:0.0.23
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/xyz123/.m2/repository/com/day/jcr/vault/content-package-maven-plugin/0.0.23/content-package-maven-plugin-0.0.23.jar
[ERROR] urls[1] = file:/C:/Users/xyz123/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[2] = file:/C:/Users/xyz123/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[3] = file:/C:/Users/xyz123/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[4] = file:/C:/Users/xyz123/.m2/repository/org/apache/maven/maven-archiver/2.3/maven-archiver-2.3.jar
[ERROR] urls[5] = file:/C:/Users/xyz123/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-9/plexus-archiver-1.0-alpha-9.jar
[ERROR] urls[6] = file:/C:/Users/xyz123/.m2/repository/org/codehaus/plexus/plexus-io/1.0-alpha-1/plexus-io-1.0-alpha-1.jar
[ERROR] urls[7] = file:/C:/Users/xyz123/.m2/repository/org/codehaus/plexus/plexus-utils/1.4.9/plexus-utils-1.4.9.jar
[ERROR] urls[8] = file:/C:/Users/xyz123/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[9] = file:/C:/Users/xyz123/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[10] = file:/C:/Users/xyz123/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar
[ERROR] urls[11] = file:/C:/Users/xyz123/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
[ERROR] urls[12] = file:/C:/Users/xyz123/.m2/repository/commons-codec/commons-codec/1.2/commons-codec-1.2.jar
[ERROR] urls[13] = file:/C:/Users/xyz123/.m2/repository/org/codehaus/mojo/animal-sniffer-maven-plugin/1.8/animal-sniffer-maven-plugin-1.8.jar
[ERROR] urls[14] = file:/C:/Users/xyz123/.m2/repository/org/codehaus/mojo/animal-sniffer/1.8/animal-sniffer-1.8.jar
[ERROR] urls[15] = file:/C:/Users/xyz123/.m2/repository/org/ow2/asm/asm-all/4.0/asm-all-4.0.jar
[ERROR] urls[16] = file:/C:/Users/xyz123/.m2/repository/org/codehaus/mojo/java-boot-classpath-detector/1.8/java-boot-classpath-detector-1.8.jar
[ERROR] urls[17] = file:/C:/Users/xyz123/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.1/maven-reporting-api-2.0.1.jar
[ERROR] urls[18] = file:/C:/Users/xyz123/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-6/doxia-sink-api-1.0-alpha-6.jar
[ERROR] urls[19] = file:/C:/Users/xyz123/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
[ERROR] urls[20] = file:/C:/Users/xyz123/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[21] = file:/C:/Users/xyz123/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/1.2/maven-common-artifact-filters-1.2.jar
[ERROR] urls[22] = file:/C:/Users/xyz123/.m2/repository/org/apache/maven/shared/maven-plugin-testing-harness/1.1/maven-plugin-testing-harness-1.1.jar
[ERROR] urls[23] = file:/C:/Users/xyz123/.m2/repository/org/apache/sling/org.apache.sling.commons.json/2.0.6/org.apache.sling.commons.json-2.0.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.slf4j.helpers.MarkerIgnoringBase
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

***************************************************************************************

 

install, build nothing works. My head is spinning :).. any suggestion?

Regards,
Chandra

1 Accepted Solution

Avatar

Correct answer by
Level 10

Actually - just tested the community article that talks about how to build a CQ app with Eclipse/Maven/vault. 

It works - as shown here:

[img]CQMaven.png[/img]

https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html

This article walks you through how to build a CQ app with Eclipse and sync the code with the AEM JCR using vault.

See if you can build the Maven project following this article.  

View solution in original post

6 Replies

Avatar

Level 10

Try following this document to build an OSGi bundle using Maven. 

https://helpx.adobe.com/experience-manager/using/first-osgi.html

It teaches you how to build a custom AEM service.  Let us know if this is successful. Its been successfully tested by many community members. 

Avatar

Level 4

My existing AEM 6.0 Maven structure worked now..

What was problem?

  1. I did not copy setting.xml from m2_home/conf to user_home/.m2
  2. I did not activate <activation>         <activeByDefault>true</activeByDefault>    </activation> profile.
  3. Maven version apache-maven-3.3.1-bin is not compatible with content-package-maven-plugin plugin ..i had to downgrade maven version to apache-maven-3.0.4.

Thanks by the way for your reply.

Regards,
Chandra

Avatar

Level 4

This problem is related with Maven Plugin content-package-maven-plugin which is fetching exception...if somebody can point/suggest regarding dependency or plugin for the same would be appreciated.I cleaned my local .m2 directory that does not help.

Avatar

Correct answer by
Level 10

Actually - just tested the community article that talks about how to build a CQ app with Eclipse/Maven/vault. 

It works - as shown here:

[img]CQMaven.png[/img]

https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html

This article walks you through how to build a CQ app with Eclipse and sync the code with the AEM JCR using vault.

See if you can build the Maven project following this article.  

Avatar

Level 1

Thanks for the solution. It's now working my system too.