https://issues.apache.org/bugzilla/show_bug.cgi?id=47602
Summary: Java task outputproperty attribute stopped working in
version 1.7.1
Product: Ant
Version: 1.7.1
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: [email protected]
ReportedBy: [email protected]
Using a compiled java class very much like this:
public class ExampleClass{
public static void main(String[] args){
System.out.println("Sample Message");
}
}
The following worked in a previous version of ant
<java fork="false"
classname="ExampleClass"
outputproperty="outputstring">
<arg line="test_arg" />
<classpath refid="classpath.path" />
</java>
<echo message="outputstring=${outputstring}"/>
No output to console other than the echo
outputstring=Sample Message
With ant 1.7.1
outputstring=
(Note: it's blank, not "outputstring=${outputstring}" which it would be were
outputstring not assigned)
If I change the java to:
public class ExampleClass{
public static void main(String[] args){
System.out.println("Sample Message");
System.err.println("Sample Message");
}
}
and change the ant target to:
<java fork="false"
classname="ExampleClass"
outputproperty="outputstring"
errorproperty="errorstring">
<arg line="test_arg" />
<classpath refid="classpath.path" />
</java>
<echo message="outputstring=${outputstring}"/>
<echo message="errorstring=${errorstring}"/>
I get this:
outputstring=
errorstring=Sample Message
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.