ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1079580 - in /ant/core/trunk: ./ src/main/org/apache/tools/ant/taskdefs/ src/tests/antunit/bugfixes/br50866/
Date Tue, 08 Mar 2011 22:24:45 GMT
Author: hibou
Date: Tue Mar  8 22:24:44 2011
New Revision: 1079580

URL: http://svn.apache.org/viewvc?rev=1079580&view=rev
Log:
Bug #50866:
 - the prefix was not propagated to imported resources within included resources.

Added:
    ant/core/trunk/src/tests/antunit/bugfixes/br50866/
    ant/core/trunk/src/tests/antunit/bugfixes/br50866/br50866-test.xml   (with props)
    ant/core/trunk/src/tests/antunit/bugfixes/br50866/common.xml   (with props)
    ant/core/trunk/src/tests/antunit/bugfixes/br50866/middle.xml   (with props)
Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=1079580&r1=1079579&r2=1079580&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Tue Mar  8 22:24:44 2011
@@ -25,6 +25,10 @@ Fixed bugs:
    setting a proxy caused problems with other Java libraries.
    Bugzilla Report 50888.
 
+ * Include task breaks dependencies or extension-points for multiple
+   files.
+   Bugzilla Report 50866.
+
 Other changes:
 --------------
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java?rev=1079580&r1=1079579&r2=1079580&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ImportTask.java Tue Mar  8 22:24:44
2011
@@ -206,10 +206,14 @@ public class ImportTask extends Task {
         boolean oldIncludeMode = ProjectHelper.isInIncludeMode();
         String oldSep = ProjectHelper.getCurrentPrefixSeparator();
         try {
-            String prefix = targetPrefix;
+            String prefix;
             if (isInIncludeMode() && oldPrefix != null
                 && targetPrefix != null) {
                 prefix = oldPrefix + oldSep + targetPrefix;
+            } else if (targetPrefix != null) {
+                prefix = targetPrefix;
+            } else {
+                prefix = oldPrefix;
             }
             setProjectHelperProps(prefix, prefixSeparator,
                                   isInIncludeMode());

Added: ant/core/trunk/src/tests/antunit/bugfixes/br50866/br50866-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/bugfixes/br50866/br50866-test.xml?rev=1079580&view=auto
==============================================================================
--- ant/core/trunk/src/tests/antunit/bugfixes/br50866/br50866-test.xml (added)
+++ ant/core/trunk/src/tests/antunit/bugfixes/br50866/br50866-test.xml Tue Mar  8 22:24:44
2011
@@ -0,0 +1,13 @@
+<project name="br50866" default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
+
+    <import file="../../antunit-base.xml" />
+
+    <include file="middle.xml" />
+
+    <target name="testinclude" depends="middle.common,middle.middle">
+        <au:assertPropertyEquals name="prop-common-init" value="br50866"/>
+        <au:assertPropertyEquals name="prop-common" value="br50866"/>
+        <au:assertPropertyEquals name="prop-middle" value="br50866"/>
+    </target>
+
+</project>
\ No newline at end of file

Propchange: ant/core/trunk/src/tests/antunit/bugfixes/br50866/br50866-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/core/trunk/src/tests/antunit/bugfixes/br50866/br50866-test.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/core/trunk/src/tests/antunit/bugfixes/br50866/br50866-test.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ant/core/trunk/src/tests/antunit/bugfixes/br50866/common.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/bugfixes/br50866/common.xml?rev=1079580&view=auto
==============================================================================
--- ant/core/trunk/src/tests/antunit/bugfixes/br50866/common.xml (added)
+++ ant/core/trunk/src/tests/antunit/bugfixes/br50866/common.xml Tue Mar  8 22:24:44 2011
@@ -0,0 +1,8 @@
+<project name="common" default="default">
+    <target name="common-init">
+        <property name="prop-common-init" value="br50866" />
+    </target>
+    <target name="common" depends="common-init">
+        <property name="prop-common" value="br50866" />
+    </target>
+</project>
\ No newline at end of file

Propchange: ant/core/trunk/src/tests/antunit/bugfixes/br50866/common.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/core/trunk/src/tests/antunit/bugfixes/br50866/common.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/core/trunk/src/tests/antunit/bugfixes/br50866/common.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ant/core/trunk/src/tests/antunit/bugfixes/br50866/middle.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/bugfixes/br50866/middle.xml?rev=1079580&view=auto
==============================================================================
--- ant/core/trunk/src/tests/antunit/bugfixes/br50866/middle.xml (added)
+++ ant/core/trunk/src/tests/antunit/bugfixes/br50866/middle.xml Tue Mar  8 22:24:44 2011
@@ -0,0 +1,7 @@
+<project name="middle" default="default">
+    <import file="common.xml" optional="true" />
+
+    <target name="middle" depends="common-init">
+        <property name="prop-middle" value="br50866" />
+    </target>
+</project>
\ No newline at end of file

Propchange: ant/core/trunk/src/tests/antunit/bugfixes/br50866/middle.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/core/trunk/src/tests/antunit/bugfixes/br50866/middle.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: ant/core/trunk/src/tests/antunit/bugfixes/br50866/middle.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message