On Nov 3, 2009, at 9:44 PM, Raja Nagendra Kumar wrote:


I generally only generate .classpath files

Could you tell me how you archive this with ant

The .classpath format is an extremely simple XML format that tells the IDE where the source paths are and the JAR files for the project. This is the Eclipse storage format. IntelliJ can be told to use the Eclipse .classpath for its dependencies as well. This requires changes to the .iml file and it also creates an additional file ending in .eml. Then, I just use a simple Groovy script to manipulate the XML in the .classpath file with the new dependencies. I really need to update my script, but it is pretty simple to manipulate XML in Groovy and Groovy inside Ant is really simple as well.

I believe the best method is to load the .classpath into the Groovy XML objects, remove all the elements whose type attribute is "var" and then generate new elements for each of the project's dependencies. The generation of the new elements will depend on the dependency management tool you are using.

-bp



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to