[Issue 2149] New - Comma in Ant property Field not working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Issue 2149] New - Comma in Ant property Field not working

michaelkebe
https://hudson.dev.java.net/issues/show_bug.cgi?id=2149
                 Issue #|2149
                 Summary|Comma in Ant property Field not working
               Component|hudson
                 Version|current
                Platform|PC
              OS/Version|Windows XP
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|ant
             Assigned to|issues@hudson
             Reported by|michaelkebe






------- Additional comments from [hidden email] Wed Jul 30 13:56:16 +0000 2008 -------
Entering

foo=bar,baz

in the Systremproperties field (in German Systemeigenschaften) of an Ant
build-step of a freestyle project.

Results in the consoleoutput of the build to:
...
BUILD FAILED
Target "baz" does not exist in the project "projectname".
...

The Help text says one can use standardformat of properties files and commas are
allowed there. (Using commas in a properties used by Ant)

A workaround is to use:
foo="bar,baz"

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 2149] Comma in Ant property Field not working

Kohsuke Kawaguchi
Administrator
https://hudson.dev.java.net/issues/show_bug.cgi?id=2149



User kohsuke changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |STARTED
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Wed Aug  6 01:15:02 +0000 2008 -------
I couldn't reproduce the problem. Any chance you can write a test case for us?

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 2149] Comma in Ant property Field not working

michaelkebe
In reply to this post by michaelkebe
https://hudson.dev.java.net/issues/show_bug.cgi?id=2149






------- Additional comments from [hidden email] Wed Aug  6 08:40:58 +0000 2008 -------
I can reproduce it on Windows. On Unix (Solaris) it works fine.

The problem is the intepretation of "," of Windows' cmd.exe:

> D:\workspace\project>ant -Dfoo=bar,baz
> Buildfile: build.xml
>
> BUILD FAILED
> Target "baz" does not exist in the project
>
> Total time: 5 seconds

> D:\workspace\project>ant "-Dfoo=bar,baz"
WORKS

> D:\workspace\project>ant -Dfoo="bar,baz"
WORKS

But fixing this by just surrounding the "-D" arguments with " is not a real fix,
because if the property contains " you have to escape them. But only on
Windows... Quite complicated...

Ant.java:
...
for (Entry<Object,Object> entry : p.entrySet()) {
    args.add("-D" + entry.getKey() + "='" + entry.getValue());
}
...


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]