File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Ant from within Eclipse 3.x

 
Ian Stone
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am at pretty early days with using Eclipse 3.x - I am
more a vi veteran when it comes to coding. Also I am
pretty new to using ant for automation of builds having
come from a shop which used make to build native code
alongside Java.

So here is my query. I can see the benefits of integrating
ant into the Eclipse IDE but how well integrated is it at
this point in time ? Before I've even gone to the trouble
of setting up an ant build.xml and managing it from within
the Eclipse IDE it occurs to me that there might be a potential
for duplication of information such as build paths stored within
the IDE (this gets munged into the .classpath file, right?)
and build path info wired into Ant.
So, do folks typically run ant alongside the automated build
capabilities offered by the JDT eclipse environment and
duplicate info or are the build path details kept in sync
via some sharing mechanism.

I know I can dive in and see but firstly I wanted to get a
grip as to how people are typically integrating their use
of ant into the Eclipse IDE and whether duplication of
config and maintenance of config is an issue when using
ant alongside the JDTs own build facilities.

~ Ian
 
Daniel Mayer
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At work, we duplicate some of the settings (as the classpath) in the ant script. We would prefer to reuse the info from the .classpath file, but that isn't trivial in our setting.

We use Ant to do some additional tasks inside eclipse, such as generating some code; and to do full builds and deployment outside of eclipse, such as in cruise control.

At home, I don't care about being able to build outside of eclipse. Here I use ant to package and upload the distribution to source forge.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33691
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ian,
Welcome to Javaranch!

We also duplicate the classpath in the build file. That's pretty much all the duplication though. It is possible to eliminate the duplication with XSLT, but nobody has had the time to figure it out.
 
Ian Stone
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the useful replies about Eclipse/Ant integration
and how you folks use it in practice.
Now I need to beef up on learning to use ant itself.
Time for a coffee and read of the ant manual and probably some
sample build.xml scripts to get me bootstrapped.

thanks for a kind and helpful response to my first JavaRanch query.

~Ian
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic