PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3237 *** shadow/3237 Wed Aug 22 14:41:38 2001 --- shadow/3237.tmp.17522 Wed Aug 22 14:41:38 2001 *************** *** 0 **** --- 1,118 ---- + +============================================================================+ + | Multiply apply tasks with different file mapings do not work consistently | + +----------------------------------------------------------------------------+ + | Bug #: 3237 Product: Ant | + | Status: NEW Version: 1.4Beta2 | + | Resolution: Platform: Other | + | Severity: Normal OS/Version: AIX | + | Priority: Other Component: Core tasks | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + When more than 1 apply task with different file mappings exist in one or + more targets, the last modified times on the second apply task seems to be + ignored. + This behaviour has been observed on a AIX platform using JDK 1.3. + It is not reproducible on Windows NT. I only have an AIX box, + so I am not sure if it is reproducible on other unix/linux platforms. + + Below is a sample build.xml file and 2 scripts to cut out and place + into files. Cut and paste into the appropriate files run on a unix + box and do the following steps: + + 1. Enter: ant setup + - This creates a 2 source files + 2. Enter: ant apply-all-unix + - This transforms the 2 source files into separate target files + 3. Repeat the above step. I observe the following: + the first file transformation is skipped because of the presence of + the target file, but the second transformation is repeated. + + On Windows NT, the last step (3) detects all file transformation have been done, + and does not invoke the transform script. + + Ralph Bohnet + EFA Software + + --------------Cut here and paste into build.xml -------------------------- + <?xml version="1.0"?> + + <project name="test" default="apply-all-windows" basedir="."> + + <target name="init"> + <tstamp/> + <mkdir dir="src"/> + </target> + + <target name="setup" depends="init"> + <touch file="src/my.foo"/> + <touch file="src/some.jms"/> + </target> + + <!-- =================== Unix targets == --> + <target name="transform1" depends="init" > + <apply executable="sh" + dest="src" type="file"> + <arg value="transform.sh"/> + <srcfile/> + <targetfile/> + <fileset dir="src" includes="**/*.foo"/> + <mapper type="glob" from="*.foo" to="*.x"/> + </apply> + </target> + + <target name="transform2" depends="init" > + <apply executable="sh" + dest="src" type="file"> + <arg value="transform.sh"/> + <srcfile/> + <targetfile/> + <fileset dir="src" includes="**/*.jms"/> + <mapper type="glob" from="*.jms" to="*.java"/> + </apply> + </target> + + <!-- =================== Dos targets == --> + <target name="transform3" depends="init" > + <apply executable="transform.bat" + dest="src" type="file"> + <srcfile/> + <targetfile/> + <fileset dir="src" includes="**/*.foo"/> + <mapper type="glob" from="*.foo" to="*.x"/> + </apply> + </target> + + <target name="transform4" depends="init" > + <apply executable="transform.bat" + dest="src" type="file"> + <srcfile/> + <targetfile/> + <fileset dir="src" includes="**/*.jms"/> + <mapper type="glob" from="*.jms" to="*.java"/> + </apply> + </target> + + <target name="apply-all-unix" depends="transform1,transform2" /> + + <target name="apply-all-windows" depends="transform3,transform4" /> + + <target name="clean"> + <delete> + <fileset dir="src" includes="*.java,*.x"/> + </delete> + </target> + </project> + --------------Cut here and paste into transform.sh -------------------------- + #!/bin/sh + echo transforming `basename $1` + echo done > $2 + + --------------Cut here and paste into transform.bat -------------------------- + @ECHO OFF + @echo transforming %2 + @echo done > %2
