ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42734] New: - New behavior of Ant-1.7.0 <available> task with <fileset>
Date Mon, 25 Jun 2007 15:23:19 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42734>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42734

           Summary: New behavior of Ant-1.7.0 <available> task with
                    <fileset>
           Product: Ant
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: Tobias.Kaese@gmx.net


The behavior of the available task with a nested <filepath> has changed from
1.6.5 to 1.7: Since 1.7.0 files can't be collected with nested filesets like

<available file="list.xml" >
	<filepath>
		<fileset dir="." includes="**/*.xml"/>
	</filepath>
</available>
 
Therefore the build-file described below produces different output with the two
ant versions:
 ANT 1.6.5:
    [echo] Value of exist0: true
    [echo] Value of exist1: true
    [echo] Value of exist2: true
    [echo] Value of exist3: ${exist3} - no existence expected
    [echo] Value of exist4: true
    [echo] Value of exist5: ${exist5} - no existence expected
    [echo] Value of exist6: true
    [echo] Value of exist9: true

 ANT 1.7.0:
    [echo] Value of exist0: true
    [echo] Value of exist1: ${exist1}
    [echo] Value of exist2: ${exist2}
    [echo] Value of exist3: ${exist3} - no existence expected
    [echo] Value of exist4: true
    [echo] Value of exist5: ${exist5} - no existence expected
    [echo] Value of exist6: ${exist6}
    [echo] Value of exist9: ${exist9}



<project name="test" default="test" basedir=".">
	<description>Test target for the available task.</description>

	<target name="prepare">
		<mkdir dir="subDir"/>
		<echo file="subDir/list.xml">
			<![CDATA[
<xxx>
   <bbb>AAA</bbb>
   <bbb>BBB</bbb>
   <bbb>CCC</bbb>
</xxx>
			]]>
		</echo>
	</target>
	
	<target name="available"  description="Test available">
		<condition property="exist0" value="true">
			<available file="list.xml" filepath="subDir">
			</available>
		</condition>
		<echo message="Value of exist0: ${exist0}"/>
		
		<condition property="exist1" value="true">
			<available file="list.xml" >
				<filepath>
					<fileset dir="." includes="**/*.xml"/>
				</filepath>
			</available>
		</condition>
		<echo message="Value of exist1: ${exist1}"/>
		
		<condition property="exist2" value="true">
			<available file="list.xml" >
				<filepath>
					<fileset dir="." includes="**/*.xml">
						<contains text="AAA"/>
					</fileset>
				</filepath>
			</available>
		</condition>
		<echo message="Value of exist2: ${exist2}"/>
		
		<condition property="exist3" value="true">
			<available file="list.xml" >
				<filepath>
					<fileset dir="." includes="**/*.xml">
						<contains text="AAH"/>
					</fileset>
				</filepath>
			</available>
		</condition>
		<echo message="Value of exist3: ${exist3} - no existence expected"/>
		
		<condition property="exist4" value="true">
			<available file="list.xml" filepath="subDir" >
				<filepath>
					<fileset file="list.xml"/>
				</filepath>
			</available>
		</condition>
		<echo message="Value of exist4: ${exist4}"/>
		
		<condition property="exist5" value="true">
			<available file="list.xml" >
				<filepath>
					<fileset file="subDir/list.xml" >
						<selector>
							<or>
								<contains text="BBA"/>
								<contains text="AAG"/>
							</or>
						</selector>
					</fileset>
				</filepath>
			</available>
		</condition>
		<echo message="Value of exist5: ${exist5} - no existence expected"/>
		
		<condition property="exist6" value="true">
			<available file="list.xml" >
				<filepath>
					<fileset file="subDir/list.xml" >
						<selector>
							<or>
								<contains text="BBB"/>
								<contains text="AAG"/>
							</or>
						</selector>
					</fileset>
				</filepath>
			</available>
		</condition>
		<echo message="Value of exist6: ${exist6}"/>
		
		<condition property="exist9" value="true">
			<available file="list.xml" filepath="subDir/subSubDir" >
			</available>
		</condition>
		<echo message="Value of exist9: ${exist9}"/>
		
	<!--	<condition property="exist11" value="true">
			<available file="list.xml"  filepath="subDir" >
				<filepath>
					<fileset file="subDir/list.xml" >
						<selector>
							<or>
								<contains text="BBA"/>
								<contains text="AAG"/>
							</or>
						</selector>
					</fileset>
				</filepath>
			</available>
		</condition>
		<echo message="Value of exist11: ${exist11} - no existence expected"/>-->
		
	</target>
	
	<target name="test" depends="prepare,available"/>

</project>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message