Expand my Community achievements bar.

SOLVED

How do I adjust mvn archetype:generate to use AEM 6

Avatar

Level 6

I generate a maven project as follows, but it uses [INFO] Using property: cqVersion = 5.6.1. How do I change  mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DarchetypeRepository=adobe-public-releases so that I can generate where cqVersion=6.0.**** in order to build an OSGI service for AEM 6?

C:\Users\clive\workspace>mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DarchetypeRepository=adobe-public-releases
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
Define value for property 'groupId': : com.adobe.cq
Define value for property 'artifactId': : customer_JcrQuery2
Define value for property 'version':  1.0-SNAPSHOT: : 1.0-SNAPSHOT
Define value for property 'package':  com.adobe.cq: : com.adobe.cq
Define value for property 'appsFolderName': : customer_JcrQuery2
Define value for property 'artifactName': : Customer Training Package
[INFO] Using property: cqVersion = 5.6.1
Define value for property 'packageGroup': :

1 Accepted Solution

Avatar

Correct answer by
Level 9

For CQ version you have the option as  -DcqVersion="6.0"

Have you tried this

mvn archetype:generate \

    -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ \
    -DarchetypeGroupId=com.day.jcr.vault \
    -DarchetypeArtifactId=multimodule-content-package-archetype \
    -DarchetypeVersion=1.0.2 \
    -DgroupId=my-group-id \
    -DartifactId=myproject \
    -Dversion=1.0-SNAPSHOT \
    -Dpackage=com.mycompany.myproject \
    -DappsFolderName=myproject \
    -DartifactName="My Project" \
    -DcqVersion="6.0" \
    -DpackageGroup="My Company"

View solution in original post

3 Replies

Avatar

Correct answer by
Level 9

For CQ version you have the option as  -DcqVersion="6.0"

Have you tried this

mvn archetype:generate \

    -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ \
    -DarchetypeGroupId=com.day.jcr.vault \
    -DarchetypeArtifactId=multimodule-content-package-archetype \
    -DarchetypeVersion=1.0.2 \
    -DgroupId=my-group-id \
    -DartifactId=myproject \
    -Dversion=1.0-SNAPSHOT \
    -Dpackage=com.mycompany.myproject \
    -DappsFolderName=myproject \
    -DartifactName="My Project" \
    -DcqVersion="6.0" \
    -DpackageGroup="My Company"

Avatar

Level 4

This is quick Mohammed Thanks..

What about this error?

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.288 s
[INFO] Finished at: 2015-03-18T15:48:12-04:00
[INFO] Final Memory: 20M/308M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.20:package (default-package) on project sponsorworks-content: Execution default-package of goal com.day.jcr.vault:cont
ent-package-maven-plugin:0.0.20:package failed: A required class was missing while executing com.day.jcr.vault:content-package-maven-plugin:0.0.20:package: org/slf4j/helpers/MarkerIgnoringBase
[ERROR] -----------------------------------------------------
[ERROR] realm =    extension>com.day.jcr.vault:content-package-maven-plugin:0.0.20
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

 

It fails for content package... Did you encounter this issue?

Avatar

Level 6

Thank you I added as follows and it works

 

mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.2 -DarchetypeRepository=adobe-public-releases -DcqVersion="6.0"