Hi Rene,
thank you for your explanation.
My problem was our existing "tomcat/lib" folder which is used by many
users and different IDEs.
This folder also contains a ".svn" subfolder.
The SyncTaks also removes this SVN subfolder.
Now I changed it and used "$buildDir/tomcat/lib" as the destination for
the SyncTask.
But now I am not sure where to place the XML-Files (log4j, ...). At the
moment the main/root project has no "src" folder.
regards,
Mathias Kalb
Am 07.01.2011 16:13, schrieb Rene Groeschke:
Am 07.01.11 15:22, schrieb Mathias Kalb:
Hi,
I used the Sync task to copy dependencies to a lib folder like the
example 15.17.
task syncTomcatLib(type: Sync) {
from configurations.tomcatLib
into "tomcat/lib"
}
The folder contains also some XML files which are deleted by the sync
task.
The Sync task syncs a folder with the files defined in the sync task.
This means, that unless you add the xml files to your syncTomcatLib
task, the xml files in tomcat/lib are always deleted.
How can I avoid the deletion of the XML files?
Where do these xml files come from? As mentioned, you could add the
source of the xml files to your sync task. I think, that's the cleanest
solution.
tried "include" and "exclude" but it doesn't help.
The properties 'includes' and 'excludes' of Sync
(http://gradle.org/0.9.1/docs/dsl/org.gradle.api.tasks.Sync.html#org.gradle.api.tasks.Sync:excludes)
do only work as filters for the source files, not for the target directory.
As a workaround you can add the already existing xml files in the folder
to your sync spec:
-------------
task syncTomcatLib(type: Sync) {
from configurations.tomcatLib
into "tomcat/lib"
from ("tomcat/lib"){
includes ['**/*.xml']
}
}
-------------
regards,
René
--
PRODATO Integration Technology GmbH
Hauptstrasse 40, 91054 Erlangen
http://www.prodato.de
Mathias Kalb, Dipl.-Inf. (FH)
mailto:[email protected]
fon: +49-9131-612877
fax: +49-9131-612881
Sitz: Ebermannstadt, Registergericht Bamberg HRB 3748
Geschäftsführer: Dr. Michael Schlundt, Dr. Christian Meiler, Prof. Dr. Stefan
Jablonski
USt-IdNr. DE199384894
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email