You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alexander Jede <al...@gmx.de> on 2008/01/22 13:10:40 UTC
[S2] Maven problems to startup a new project
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
Re: [S2] [SOLVED] Maven problems to startup a new project
Posted by Alexander Jede <al...@gmx.de>.
Hi,
after upgrading maven to an other version now it works.....
Thanks
Alex
Re: [S2] Maven problems to startup a new project
Posted by Laurie Harper <la...@holoweb.net>.
The 2.0.11 archetype is available, but not in the default Maven
repository. You have to tell Maven where to look for it. The following
(thanks Nuwan!) works for me:
mvn archetype:create -DgroupId=com.s2.anu -DartifactId=s2proj \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-starter \
-DarchetypeVersion=2.0.11 \
-DremoteRepositories=http://people.apache.org/builds/struts/m2-staging-repository
L.
James Mitchell wrote:
> I also thought 2.0.11-SNAPSHOT was available, but no so (unless you
> install it locally yourself)
>
> Instead, use the maven command on this page:
> http://struts.apache.org/2.x/docs/ready-set-go.html
>
>
>
>
>
> On Jan 22, 2008 7:10 AM, Alexander Jede <al...@gmx.de> 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] Maven problems to startup a new project
Posted by James Mitchell <jm...@gmail.com>.
I also thought 2.0.11-SNAPSHOT was available, but no so (unless you
install it locally yourself)
Instead, use the maven command on this page:
http://struts.apache.org/2.x/docs/ready-set-go.html
On Jan 22, 2008 7:10 AM, Alexander Jede <al...@gmx.de> 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
>
--
James Mitchell
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] Maven problems to startup a new project
Posted by Alexander Jede <al...@gmx.de>.
Hallo Nils
Am Dienstag, den 22.01.2008, 13:29 +0100 schrieb Nils-Helge Garli
Hegvik:
> 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'?
Yes I entered the command in on line.
If I start mvn archetype:create , it begins to download many jar's ( I
think this should be all kinds of project which supports archetype).
At the end I get the error, that an Artifact ID have to be specified if
I create a new project.
I am very confusing what maven is doing there, because it tries to take
always the second parameter as a task and not as a parameter.
Thanks
Alex
Re: [S2] Maven problems to startup a new project
Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
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 <al...@gmx.de> 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org