AnsweredAssumed Answered

maven-alfresco-amp-archetype question

Question asked by m_scapoli on Jan 18, 2012
Latest reply on Mar 19, 2014 by stalinlouis
Hello there! I'm a student and I'm developing an Alfresco plug-in for my academic degree thesis.

this is my configuration:
GNU/Linux Ubuntu 11.10 x86_64
Eclipse Java EE Development Tools Version: 3.3.1

other information from mvn -version command output:
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /usr/local/apache-maven-3.0.3
Java version: 1.7.0_147-icedtea, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: it_IT, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-14-generic", arch: "amd64", family: "unix"
my problem is in launching the one line command for managing AMP lifecycle with Maven like is written here: http://wiki.alfresco.com/wiki/Managing_Alfresco_Lifecyle_with_Maven#How_to_manage_Alfresco_AMPs_.28alfresco.2Fmodule.2F.2A_based_AMP_builds.29_with_Maven

in previous tests that I made with the Alfresco 3.4 Community version on a 32 bit system I've made some changes to the line for resolve many issues from the amp-archetype maven manage; the new command line figure like that: (and work fine for the previous configuration..)
mvn archetype:generate -DarchetypeGroupId=com.sourcesense.alfresco -DarchetypeArtifactId=maven-alfresco-amp-archetype -DarchetypeVersion=1.9.1 -DgroupId=com.mycompany \-DartifactId=myamp -Dversion=1.0 -DarchetypeRepository=http://maven.alfresco.com/nexus/content -DinteractiveMode=false
now the command line (run with the -e switch to see the full stack trace of the errors) return me this error and I don't find a way to manage that:

[INFO] Error stacktraces are turned on.
[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) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] — maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom —
[INFO] Generating project in Batch mode
[INFO] Archetype defined by properties
Downloading: http://maven.alfresco.com/nexus/content/com/sourcesense/alfresco/maven-alfresco-amp-archetype/1.9.1/maven-alfresco-amp-archetype-1.9.1.jar
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 4.459s
[INFO] Finished at: Wed Jan 18 11:44:12 CET 2012
[INFO] Final Memory: 13M/309M
[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.sourcesense.alfresco:maven-alfresco-amp-archetype:1.9.1) -> [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.sourcesense.alfresco:maven-alfresco-amp-archetype:1.9.1)
   at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
   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:84)
   at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
   at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
   at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
   at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
   at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
   at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
   at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
   at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
   at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: The desired archetype does not exist (com.sourcesense.alfresco:maven-alfresco-amp-archetype:1.9.1)
   at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:221)
   at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
   at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
   … 19 more
Caused by: org.apache.maven.archetype.exception.UnknownArchetype: The desired archetype does not exist (com.sourcesense.alfresco:maven-alfresco-amp-archetype:1.9.1)
   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
[ERROR]
[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/MojoFailureException

if anyone have a nice idea of what it's happened I'm very glad to him/her..

sorry for the "spaghetti english", I'll do better next time, promise  :D

Outcomes