aspose 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
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30919
    
158

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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30919
    
158

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse: buildfile using ant.