Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

archetype:generate fails to execute goal

Avatar

Level 5

I'm following these instructions on Creating your first AEM Service using an Adobe Maven Archetype project

When I reach the mvn command to generate the archetype: 

mvn archetype:generate -DarchetypeGroupId=com.day.jcr.vault -DarchetypeArtifactId=multimodule-content-package-archetype -DarchetypeVersion=1.0.0 -DarchetypeRepository=adobe-public-releases -e

I get the following error

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.424 s [INFO] Finished at: 2015-01-27T09:51:35-05:00 [INFO] Final Memory: 11M/81M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.day.jcr.vault:multimodule-content-package-archetype:1.0.2) -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.day.jcr.vault:multimodule-content-package-archetype:1.0.2) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216) at org.apache.maven.cli.MavenCli.main(MavenCli.java:160) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoFailureException: The desired archetype does not exist (com.day.jcr.vault:multimodule-content-package-archetype:1.0.2) at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:221) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: org.apache.maven.archetype.exception.UnknownArchetype: The desired archetype does not exist (com.day.jcr.vault:multimodule-content-package-archetype:1.0.2) at org.apache.maven.archetype.ui.generation.DefaultArchetypeGenerationConfigurator.configureArchetype(DefaultArchetypeGenerationConfigurator.java:117) at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:205) ... 21 more
1 Accepted Solution

Avatar

Correct answer by
Level 5

This was a java related issue. I had to upgrade to Java 8.

View solution in original post

4 Replies

Avatar

Level 10

This works well. Make sure that you have successfully setup maven and you use these commands:

[img]commandlineA.png[/img]

The result will be:

[img]commandlineB.png[/img]

Avatar

Level 10
    Inthe article, there is a sample xml file you can place in the .m2 dir. Your issue seems to suggest the xml file is not present. This is where adobe repo is specified.

Avatar

Correct answer by
Level 5

This was a java related issue. I had to upgrade to Java 8.

Avatar

Level 5

When I run mvn --version I get this output.

Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T12:29:23-05:00) Maven home: /usr/local/apache-maven/apache-maven-3.2.5 Java version: 1.6.0_65, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: en_US, platform encoding: MacRoman OS name: "mac os x", version: "10.10.1", arch: "x86_64", family: "mac"

Doing some research, it's suggested this is a proxy issue, however I've tried it behind multiple network connection with no dice.

For what it's worth, a repository is successful created at /{user}/.m2/repository, though I can't confirm (because I'm not entirely sure what I'm looking for) whether specific packages related to this issue are there.