git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@538995 13f79535-47bb-0310-9956-ffa450edef68master
@@ -81,6 +81,9 @@ Fixed bugs: | |||||
* Regression: concat fixlastline="true" should not have applied to | * Regression: concat fixlastline="true" should not have applied to | ||||
nested text, but did in Ant 1.7.0. Bugzilla 42369. | nested text, but did in Ant 1.7.0. Bugzilla 42369. | ||||
* Regression: ant.version was not passed down in <subant>. | |||||
This worked in Ant1.6.5, but not in 1.7.0. Bugzilla bug 42263 | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
* <script> now has basic support for JavaFX scripts | * <script> now has basic support for JavaFX scripts | ||||
@@ -309,6 +309,12 @@ public class Project implements ResourceFactory { | |||||
setAntLib(); | setAntLib(); | ||||
} | } | ||||
/** | |||||
* Set a property to the location of ant.jar. | |||||
* Use the locator to find the location of the Project.class, and | |||||
* if this is not null, set the property {@link MagicNames#ANT_LIB} | |||||
* to the result | |||||
*/ | |||||
private void setAntLib() { | private void setAntLib() { | ||||
File antlib = org.apache.tools.ant.launch.Locator.getClassSource( | File antlib = org.apache.tools.ant.launch.Locator.getClassSource( | ||||
Project.class); | Project.class); | ||||
@@ -199,9 +199,9 @@ public class Ant extends Task { | |||||
getProject().copyUserProperties(newProject); | getProject().copyUserProperties(newProject); | ||||
if (!inheritAll) { | if (!inheritAll) { | ||||
// set Java built-in properties separately, | |||||
// b/c we won't inherit them. | |||||
newProject.setSystemProperties(); | |||||
// set Ant's built-in properties separately, | |||||
// because they are not being inherited. | |||||
newProject.initProperties(); | |||||
} else { | } else { | ||||
// set all properties from calling project | // set all properties from calling project | ||||
@@ -0,0 +1,26 @@ | |||||
<project default="antunit" xmlns:au="antlib:org.apache.ant.antunit"> | |||||
<description > | |||||
Test that subant properly sets various properties | |||||
</description> | |||||
<import file="../antunit-base.xml" /> | |||||
<target name="tearDown"> | |||||
<delete file="binaryAppendDest" /> | |||||
<delete file="encodeStringDest" /> | |||||
</target> | |||||
<target name="assertProperties"> | |||||
<au:assertPropertySet name="ant.version" /> | |||||
<au:assertPropertySet name="java.home" /> | |||||
<au:assertPropertySet name="java.class.path" /> | |||||
</target> | |||||
<target name="testAntVersion"> | |||||
<subant inheritall="false" target="assertProperties"> | |||||
<fileset file="${ant.file}" /> | |||||
</subant> | |||||
</target> | |||||
</project> |