Equal sign on command line (Maven and wicket quickstart)

Jul 14, 2008
12
0
#1
I used maven commands generated from the Wicket quick start.

You can use http://wicket.apache.org/quickstart.html to very quickly generate starting point with wicket and maven. To use this, you download and install Maven, and then run this single command:

mvn archetype:create -DarchetypeGroupId=org.apache.wicket -DarchetypeArtifactId=wicket-archetype-quickstart -DarchetypeVersion=1.3.4 -DgroupId=com.mycompany -DartifactId=myproject
I spent many hours tracking down why this fails from TCC, and it works from CMD. From TCC, the argument -Dx=y is received as two arguments, -Dx and y. On CMD, this is recieved as a single argument. It turns out that this works if I use quotes to prevent the arguments from splitting.

mvn archetype:create "-DarchetypeGroupId=org.apache.wicket" "-DarchetypeArtifactId=wicket-archetype-quickstart" "-DarchetypeVersion=1.3.4" "-DgroupId=com.mycompany" "-DartifactId=myproject"
Wow, that was annoying...
 
#2
pitonyak wrote:
| I used maven commands generated from the Wicket quick start.
|
| You can use http://wicket.apache.org/quickstart.html to very quickly
| generate starting point with wicket and maven. To use this, you
| download and install Maven, and then run this single command:
|
|
| ---Quote---
| mvn archetype:create -DarchetypeGroupId=org.apache.wicket
| -DarchetypeArtifactId=wicket-archetype-quickstart
| -DarchetypeVersion=1.3.4 -DgroupId=com.mycompany
| -DartifactId=myproject ---End Quote---
| I spent many hours tracking down why this fails from TCC, and it
| works from CMD. From TCC, the argument -Dx=y is received as two
| arguments, -Dx and y. On CMD, this is recieved as a single argument.
| It turns out that this works if I use quotes to prevent the arguments
| from splitting.
|
|
| ---Quote---
| mvn archetype:create "-DarchetypeGroupId=org.apache.wicket"
| "-DarchetypeArtifactId=wicket-archetype-quickstart"
| "-DarchetypeVersion=1.3.4" "-DgroupId=com.mycompany"
| "-DartifactId=myproject" ---End Quote---
| Wow, that was annoying...

Quite a while ago in the old (sparklist) NG there were several threads about
adding the equal sign = to the list of command line parameter separators.
Rex stated that this is how new versions of CMD.EXE work, which he needs to
emulate. Correspondingly, a critical information missing from your post is
the OS you use. You mentioned TCC, which implies V9, though you ought to
specify the full build info. I use 9.02.151, AFAIK the latest build
available. Rex has already fixed a problem (not related to your issue) that
will be in build 152, which has not been released yet.
--
Steve
 
Jul 14, 2008
12
0
#3
Quite a while ago in the old (sparklist) NG there were several threads about
adding the equal sign = to the list of command line parameter separators.
Rex stated that this is how new versions of CMD.EXE work, which he needs to emulate.
Very interesting.... This has the potential to break many items people that live in the Java world and set arguments using -D<varname>=<value>. They will only break because they are not adding quotes by default. Now that I am aware of this, I can watch for the problem in the future.

Correspondingly, a critical information missing from your post is
the OS you use. You mentioned TCC, which implies V9, though you ought to specify the full build info. I use 9.02.151, AFAIK the latest build
available. Rex has already fixed a problem (not related to your issue) that
will be in build 152, which has not been released yet.
TCC 9.02.151 Windows XP [Version 5.1.2600]

I try to stay current with my JPSoft products that I use. I think that I paid for two years service contract just so I did not need to worry about it when a new version came out.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,724
47
Albuquerque, NM
prospero.unm.edu
#4
http://wicket.apache.org/quickstart.htmlI spent many hours tracking down why this fails from TCC, and it works from CMD. From TCC, the argument -Dx=y is received as two arguments, -Dx and y. On CMD, this is recieved as a single argument.
CMD.EXE doesn't behave like that here (Windows XP.) I think that any program which relies on this behavior is going to break under XP.