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 ant folders 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 "ant folders" Watch "ant folders" New topic
Author

ant folders

kittu karan
Ranch Hand

Joined: Mar 09, 2008
Posts: 63
Hi,
what is the structure of ant folders I mean we execute build.xml it creates folders like lib,dist.etc and what have to place in different folders?
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Hi Kiran,

You question does not seem to provide the complete requirement. Do you mean to ask what structures you have to have in your environment so as to meet with the J2EE specification?

If not, what structures the ant should be given to execute? In that case , it really does not matter. Any folder structure can be used and ant has to be instructed to fetch the files inside the directories by properly pointing to the top-level/root directory.

If you have meant to ask what exactly the contents should be present in the folders like lib,dist etc by looking at your project architecture means

lib - is used to keep all the library files like any .jar files your application may refer to.

dist - means distribution. it is just to keep your archive file (either .war or .ear) so that you can just distribute that file alone for your application to be hosted.


does that help?


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16054
    
  21

Ant isn't like Maven. It doesn't force a fixed directory structure on projects.


Customer surveys are for companies who didn't pay proper attention to begin with.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Originally posted by Tim Holloway:
Ant isn't like Maven. It doesn't force a fixed directory structure on projects.


Is that so?

I have worked in Ant and know that it is yet another tool like Maven. But have not yet started looking at it.

Thank you for the information Tim
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16054
    
  21

The primary difference between Ant and Maven is that Maven has the build rules already embedded in the Maven system. So if you set up the right directories, place the right files in them, and invoke the desired Maven goal, everything is magically done for you (magic meaning you really can't tell what it's doing, just what comes out the other end).

Ant, on the other hand, does nothing by itself. You have to set up your own rules, and because you do, you can select your own project structure.

Maven is popular for big projects - especially open-source ones, because the buy-in time is short. People don't have to learn a new directory structure for each project they come into. However, it can be somewhat confining.

Additionally, Maven can automatically download dependent components from component repositories (both standard/global and local/custom) and upload constructed components to component repositories. These are binary repositories and not to be confused with source repositories.

Ant is for people who want complete control and are willing to pay the price.

Which tool you prefer to use is largely a matter of personal preference, based on the kind of work your project needs to have done to get built, tested, deployed, etc.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

That's really great. Thank you very much for giving a insightful thought on both the tools Tim.
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
Raghavan,

Again to you, for showing me this post. It's great to read the pros and cons of the thing that you are really working on


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

My Pleasure Niranjan!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ant folders