File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Eclipse: buildfile using ant. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Eclipse: buildfile using ant." Watch "Eclipse: buildfile using ant." New topic
Author

Eclipse: buildfile using ant.

Mariam A. Shamsi
Greenhorn

Joined: Dec 15, 2008
Posts: 16
Hello everybody,

I am working on eclipse 3.4.0 to build a dynamic we project that uses apache server and
derby network server (for database connection). I am done with the project and I need
now to have a buildfile that can be used to run the software during the deployement process-
separately from eclipse-. Also, the project requires some kind of calling external tools
like jarsigner, jarverify, copying libraries, classes, keys, etc to be run successfully.
I searched a lot about how to do this (automation) using eclipse, and I found something about "ant".
I am not familiar with this tool, thus can you please let me know how to use this "ant"
to "automatically" generate build file for the project? And how to let "ant" be able to create
directory tree, use external tools, copy classes, etc? Is it possible?

Please, I spent lot of time searching about this without brilliant results.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

Have you looked at the Ant website yet? It's a hard word to find just by searching since "Ant" is a common English word!


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Mariam A. Shamsi
Greenhorn

Joined: Dec 15, 2008
Posts: 16
Jeanne Boyarsky wrote:Have you looked at the Ant website yet? It's a hard word to find just by searching since "Ant" is a common English word!


Yes, I looked at this website, but it seems that the process is not automated. My question is:
How to create buid.xml for dynamic web project automatically . Please let me know if this
possible under eclipse or not.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

Eclipse 3.4 is supposed to have an option to right click a project and export the build.xml. This would give you a starting point.

Ant still wouldn't generate everything - just what your workspace build does.

(Disclaimer: I haven't tried it yet from Eclipse.)
Mariam A. Shamsi
Greenhorn

Joined: Dec 15, 2008
Posts: 16
Jeanne Boyarsky wrote:Eclipse 3.4 is supposed to have an option to right click a project and export the build.xml. This would give you a starting point.

Ant still wouldn't generate everything - just what your workspace build does.

(Disclaimer: I haven't tried it yet from Eclipse.)


Thanks a lot, another question, can you help me in constructing the structure of build.xml for
dynamic web project that uses derby and apache tomcat server? And, is there any way that
let ant creats jar files for java packages for me?
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Ant has a Jar task which will create a jar for you. Your dynamic web app structure can be anything really, Ant will give you the flexibility to work around that. I highly recommend you work through the Ant tutorials on their website.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Eclipse: buildfile using ant.
 
Similar Threads
Eclipse and Ant
Eclipse + ANT building EAR project - best practices? Manuals?
disable checking syntax(When using ant with Eclipse)
Ant integration with Eclipse [Build.Properties]
Eclipse and ANT