Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Trying to build AEM Projects using Apache Maven

Avatar

Level 6

I am following http://docs.adobe.com/docs/en/aem/6-0/develop/how-tos/ht-projects-maven.html

 

But the following step fails 

Create the initial structure from Adobe's multimodule-content-package-archetype

In your shell, go to a directory where your project is supposed to be created.

In the following example, line breaks are only to make reading simpler. Everything goes on one line.

     
1
2
3
4
5
6
7
8
9
10
11
12
13
$ 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="5.6.1" \
    -DpackageGroup="My Company"

 

 

c:\Users\clive_stewart\M_S1>mvn archetype:generate  -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ \ -DarchetypeGroupId=com.day.jcr.vault \ -DarchetypeArt
ifactId=multimodule-content-package-archetype \ -DgroupId=my-group-id \ -DartifactId=OnnetShoporiteAfrica \ -Dversion=1.0-SNAPSHOT \ -Dpackage=com.onnet.ShopriteAfrica \ -DappsFold
erName=ShopriteAfrica \ -DartifactName="ShopriteAfrica" \ -DcqVersion="5.6.1" \ -DpackageGroup="Shoprite Africa"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.155 s
[INFO] Finished at: 2014-07-08T10:27:48+02:00
[INFO] Final Memory: 4M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (c:\Users\clive_stewart\M_S1). Please verify you invoked Maven from the correct d
irectory. -> [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/MissingProjectException
c:\Users\clive_stewart\M_S1>mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault \
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.269 s
[INFO] Finished at: 2014-07-08T10:29:25+02:00
[INFO] Final Memory: 4M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (c:\Users\clive_stewart\M_S1). Please verify you invoked Maven from the correct d
irectory. -> [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/MissingProjectException
c:\Users\clive_stewart\M_S1>-DarchetypeArtifactId={id_of_archetype} -DarchetypeVersion=1.0.2 \
'-DarchetypeArtifactId' is not recognized as an internal or external command,
operable program or batch file.

c:\Users\clive_stewart\M_S1>-DarchetypeRepository=adobe-public-releases
'-DarchetypeRepository' is not recognized as an internal or external command,
operable program or batch file.

c:\Users\clive_stewart\M_S1>mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault \
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.307 s
[INFO] Finished at: 2014-07-08T10:29:41+02:00
[INFO] Final Memory: 4M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (c:\Users\clive_stewart\M_S1). Please verify you invoked Maven from the correct d
irectory. -> [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/MissingProjectException
c:\Users\clive_stewart\M_S1>-DarchetypeArtifactId={id_of_archetype} -DarchetypeVersion=1.0.2 \
'-DarchetypeArtifactId' is not recognized as an internal or external command,
operable program or batch file.

 

 

I thought that the multimodule-content-package-archetype created a pom file.

 

 

Please help, I am stuck at this point

 

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Clive,

Thanks for your feedback. Unfortunately, the documentation page you referenced needs to be updated. We have an issue open to have this documentation updated as soon as possible. Until then, this link may help you working with Maven: http://experiencedelivers.adobe.com/cemblog/en/experiencedelivers/2014/05/aem6-maven-dependencies.ht.... Please let me know if you need more assistance.

Regards,

Alva

View solution in original post

7 Replies

Avatar

Correct answer by
Employee

Hi Clive,

Thanks for your feedback. Unfortunately, the documentation page you referenced needs to be updated. We have an issue open to have this documentation updated as soon as possible. Until then, this link may help you working with Maven: http://experiencedelivers.adobe.com/cemblog/en/experiencedelivers/2014/05/aem6-maven-dependencies.ht.... Please let me know if you need more assistance.

Regards,

Alva

Avatar

Employee

Clive-

This is a very strange error to get when using the archetype:generate goal. Do you see the same error ("The goal you specified requires a project to execute but there is no POM in this directory") if you just run "mvn archetype:generate" ?

If so, you can try running "mvn org.apache.maven.plugins:maven-archetype-plugin:2.2:generate" ?

If that works (and by "work" I mean that it prompts you to select an archetype), try using that longer form with the original command arguments.

Regards,

Justin

Avatar

Level 6

Unfortunately, for the the rest of this year I am stuck on AEM 5.6

Avatar

Level 6

If I run "mvn archetype:generate" I do not get the error

 

Clive

Avatar

Employee

I notice that you've retained the backslashes in the command. I think that only works on *nix-style operating systems. Can you try running the command like this:

mvn archetype:generate -DarchetypeRepository=http://repo.adobe.com/nexus/content/groups/public/ -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DgroupId=my-group-id -DartifactId=OnnetShoporiteAfrica -Dversion=1.0-SNAPSHOT -Dpackage=com.onnet.ShopriteAfrica -DappsFolderName=ShopriteAfrica -DartifactName="ShopriteAfrica" -DcqVersion="5.6.1" -DpackageGroup="Shoprite Africa"

all on one line, no back slashes.

Avatar

Level 6

I have tried it with the non *nix format and it worked.

 

Thank you 🙂