Bug#458895: maven2: Creating empty project with artifacts fails
Valliet Emmanuel
emmanuel.valliet at gmail.com
Thu Jan 3 13:41:39 UTC 2008
Package: maven2
Version: 2.0.8-3
Severity: normal
Hi,
I installed the maven2 debian package, and tried to make an empty j2ee
package using the artifacts, and it failed:
fylb at beap:~/devel/java/sources$ mvn -e archetype:create -DgroupId=org.homelinux.beap -DartifactId=manu -DarchetypeArtifactId=maven-archetype-j2ee-simple
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/1.0-alpha-7/maven-archetype-plugin-1.0-alpha-7.pom
4K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype/1.0-alpha-7/maven-archetype-1.0-alpha-7.pom
3K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/archetype/maven-archetype-parent/2/maven-archetype-parent-2.pom
2K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/5/maven-parent-5.pom
14K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/apache/3/apache-3.pom
3K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/1.0-alpha-7/maven-archetype-plugin-1.0-alpha-7.jar
12K downloaded
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task 'artifactId=manu': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: Invalid task 'artifactId=manu': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1515)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:386)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:138)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Thu Jan 03 13:22:30 GMT 2008
[INFO] Final Memory: 2M/7M
[INFO] ------------------------------------------------------------------------
fylb at beap:~/devel/java/sources$
After some hair scratching, I tried with the apache distribution:
fylb at beap:~/devel/java/sources$ ../apache-maven-2.0.8/bin/mvn archetype:create -DgroupId=org.homelinux.beap -DartifactId=manu -DarchetypeArtifactId=maven-archetype-j2ee-simple
[...]
[Lot of dependencies downloads]
[...]
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 41 seconds
[INFO] Finished at: Thu Jan 03 13:27:49 GMT 2008
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
For information, I emptied the maven repository each time, and I'm running the
sun JDK 6; I tried on a different machine, which has a cleaner sid
installation, but the result was te same.
I tried to investigate, but I could not find any real lead...
Maybe this one, when removing some arguments:
fylb at beap:~/devel/java/sources$ mvn -e archetype:create -DgroupId=org.homelinux.beap
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-archetype-plugin: checking for updates from central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-archetype-plugin/1.0-alpha-7/maven-archetype-plugin-1.0-alpha-7.pom
[...]
[Lot more dependencies downloads, as with the apache distribution]
[And it obviously fails, as some arguments are missing]
[...]
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error creating from archetype
Embedded error: Artifact ID must be specified when creating a new project from an archetype.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error creating from archetype
[...]
Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating from archetype
at org.apache.maven.plugin.archetype.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:237)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
... 16 more
Caused by: org.apache.maven.archetype.ArchetypeTemplateProcessingException: Artifact ID must be specified when creating a new project from an archetype.
at org.apache.maven.archetype.DefaultArchetype.createArchetype(DefaultArchetype.java:232)
at org.apache.maven.plugin.archetype.MavenArchetypeMojo.execute(MavenArchetypeMojo.java:224)
... 18 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 2 seconds
[INFO] Finished at: Thu Jan 03 13:37:09 GMT 2008
[INFO] Final Memory: 6M/16M
[INFO] ------------------------------------------------------------------------
Som, it may be a problem with the arguments parsing, perhaps ?
Cheers,
Valliet Emmanuel
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (300, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.22
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash
Versions of packages maven2 depends on:
ii libcommons-cli-java 1.1-1 API for working with the command l
ii libdoxia-java 1.0-alpha-7-1 a powerful content generation fram
ii libjsch-java 0.1.34ds1-1 java secure channel
ii libjtidy-java 7+svn20070309-1 a Java port of HTML Tidy, a HTML s
ii libplexus-interactivity- 1.0-alpha-6-2 interactivity API for the Plexus f
ii libplexus-utils-java 1:1.4.8-1 utilities for the Plexus framework
ii libwagon-java 1.0-beta-2-2 tools to manage Maven artifacts an
ii libxalan2-java 2.7.0-5 XSL Transformations (XSLT) process
maven2 recommends no packages.
-- no debconf information
More information about the pkg-java-maintainers
mailing list