Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.2.1
-
Fix Version/s: Issues to be reviewed for 3.x
-
Component/s: None
-
Labels:None
-
Environment:Windows XP Pro (32-Bit) and Take Command LE(Freeware Edition of JP-Soft)
-
Complexity:Intermediate
-
Number of attachments :
Description
Creating a new project with the given example from Guide to Webapps (http://maven.apache.org/guides/mini/guide-webapp.html) does not work and results with
c:\temp> mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp
[...]
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task 'com.mycompany.app': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal
[...]
If you are doing a
echo %MAVEN_CMD_LINE_ARGS%
you will see that the equal signs (=) will not be there. This is because of the use of %$ getting all parameters. Maybe this was the default in 4NT but with Take Command you have to use %*
Tested with TCC LE 11,00,37 Windows XP [Version 5,1,2600]
Testcase:
Execute "mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp" in Take Command. Using the original mvn.bat it will result in the error above. If this error is fixed, a project will be created successfully.
Created a little patch for maven2 and 3.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | Issues to be reviewed for 3.x [ 13145 ] |
I'm new to maven, but this issue had me scratching my head for almost the entire day. I assumed I was doing something wrong when the property value I was passing in from the command line wasn't being translated correctly.
I applied Andre's patch and everything works beautifully now. I hope this fix makes it into a standard release.