ant based copy task with a <different selector copise all files, not
differences.
---------------------------------------------------------------------------------
Key: MAVEN-1633
URL: http://jira.codehaus.org/browse/MAVEN-1633
Project: maven
Type: Bug
Components: jelly/ant integration
Versions: 1.0.2
Environment: Linux (Ubuntu Hoary 5.04)
jdk 1.4.2_05
Reporter: Ramon Buckland
Attachments: ant_selector_bug_maventest.zip
The ant different selector
(http://ant.apache.org/manual/CoreTypes/selectors.html#differentselect)
Will select files from one location, that are different in another.
a simple test with maven shows it is not behaving as expected.
----- to replicate problem See below .. and see attached replication of issue
-----
Step 1
mkdir target/local
mkdir target/local.changed
mkdir target/remote
Step 2
copy some files into local
copy same files into remote
Step 3
modify one file in remote
Step 4
create ant build.xml file
<project name="test">
<target name="runtest">
<copy todir="target/local.changed">
<fileset dir="target/remote">
<different targetdir="target/local" ignoreFileTimes="true"/>
</fileset>
</copy>
</target>
</project>
Step 5
run ant to see what it should do
ant runtest
----------actual output-------------
$ /opt/apache-ant-1.6.1/bin/ant runtest
Buildfile: build.xml
runtest:
[copy] Copying 1 file to
/home/rbuckland/projects/workspace.incubator/maventest/target/local.new
BUILD SUCCESSFUL
Total time: 1 second
----------actual output-------------
Step 6
create a maven.xml
<project xmlns:ant="jelly:ant">
<goal name="runtest">
<ant:copy todir="target/local.changed">
<ant:fileset dir="target/remote">
<ant:different targetdir="target/local" ignoreFileTimes="true"/>
</ant:fileset>
</ant:copy>
</goal>
</project>
Step 7
run maven
----------actual output-------------
$ maven runtest
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
build:start:
runtest:
[copy] Copying 2 files to
/home/rbuckland/projects/workspace.incubator/maventest/target/local.changed
BUILD SUCCESSFUL
Total time: 1 seconds
Finished at: Wed Jun 22 19:23:04 EST 2005
----------actual output-------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]