1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Equal sign on command line (Maven and wicket quickstart)

Discussion in 'Support' started by pitonyak, Jul 15, 2008.

  1. pitonyak

    Joined:
    Jul 14, 2008
    Messages:
    12
    Likes Received:
    0
    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:

    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.

    Wow, that was annoying...
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    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
     
  3. pitonyak

    Joined:
    Jul 14, 2008
    Messages:
    12
    Likes Received:
    0
    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.

    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.
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    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.
     

Share This Page