ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pontarelli <>
Subject Re: IDEA Project generation from ant
Date Wed, 04 Nov 2009 15:23:31 GMT

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message