Is that the exact command you typed? On one line? The command works just fine with me (except that the archetype version does not exist, I think the latest is 2.0.9-SNAPSHOT). I only get the same error as you if I type the 'mvn' command without the plugin and goal. Please try again and make sure that you type everything on one line, and that you're not missing one or more of the arguments. If it's still not working, what happens if you just type 'mvn archetype:create'?
Nils-H On Jan 22, 2008 1:10 PM, Alexander Jede <[EMAIL PROTECTED]> wrote: > Hi list, > I tried to create a new project with maven. That for I entered: > > mvn archetype:create -DgroupId=com.myCompany.mySystem \ > -DartifactId=myWebApp \ > -DarchetypeGroupId=org.apache.struts \ > -DarchetypeArtifactId=struts2-archetype-starter \ > -DarchetypeVersion=2.0.11 > > but as a result I only get an error: > ----- %<------------ > [ERROR] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Invalid task 'artifactId=myWebApp': you must specify a valid lifecycle > phase, or a goal in the format plugin:goal or > pluginGroupId:pluginArtifactId:pluginVersion:goal > ----- %<------------ > > If I add the -e switch I get the following message: > ----- %<------------ > [INFO] Trace > org.apache.maven.BuildFailureException: Invalid task 'artifactId=myWebApp': > 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) > ----- %<------------ > > Can anyone help me please? > > I use: > $ mvn --version > Maven version: 2.0.8 > Java version: 1.6.0 > OS name: "linux" version: "2.6.23-1-amd64" arch: "amd64" Family: "unix" > > Thanks a lot > Alex > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]