Bug 38392 - DotNet Antlib (1.6.2 compatible) MSBuild task doesn't properly delimit target and property parameters
Summary: DotNet Antlib (1.6.2 compatible) MSBuild task doesn't properly delimit target...
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: .NET Antlib (show other bugs)
Version: 1.6.5
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 1.0
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-26 00:02 UTC by Brian Watson
Modified: 2006-09-12 21:00 UTC (History)
1 user (show)



Attachments
Proposed patch - fixes the delimiter problem (776 bytes, patch)
2006-01-26 00:04 UTC, Brian Watson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Watson 2006-01-26 00:02:27 UTC
The MSBuild task (DotNet 1.6.2 compatible) fails to properly delimit targets and 
properties when multiple targets or properties are specified.

Example
<msbuild>
        <property name="Prop1" value="abc"/>
        <property name="Prop2" value="xyz"/>
</msbuild>

results in -p:Prop1=abcProp2=xyz.  Note the missing semicolon between the Prop1 
and Prop2 name-value pairs.  Patch follows:

Index: MSBuildTask.java
===================================================================
--- MSBuildTask.java    (revision 372335)
+++ MSBuildTask.java    (working copy)
@@ -64,6 +64,9 @@
                 if (!first) {
                     sb.append(";");
                 }
+                else {
+                    first = false;
+                }
                 sb.append(t.getName());
             }
             return new String[]{sb.toString()};
@@ -83,6 +86,9 @@
                 if (!first) {
                     sb.append(";");
                 }
+                else {
+                    first=false;
+                }
                 sb.append(p.getName()).append("=").append(p.getValue());
             }
             return new String[]{sb.toString()};
~
Comment 1 Brian Watson 2006-01-26 00:04:25 UTC
Created attachment 17504 [details]
Proposed patch - fixes the delimiter problem

This is the first time I've ever submitted a bug/patch so I'm sorry if I didn't
adhere to the correct process.
Comment 2 Stefan Bodewig 2006-01-26 06:14:06 UTC
I've just created new components for the three new antlibs.

Will take care of the bug.