File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Build types? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Build types?" Watch "Build types?" New topic

Build types?

Vikas K Gupta

Joined: Dec 07, 2010
Posts: 6
I am currently using eclipse helios, JBoss 5, Struts 2.2.1.

I use IDE to run/stop JBoss, to publish Struts applications and I love this automated task. But I saw in many book that they prefer build process of Ant or more specifically say Maven. Why do they prefer it. What are the advantages of using maven over IDE. I am loving the way my IDE is doing for me. I just click run as- on server (specified) and IDE even opens browser in eclipse and show me the output.

I'm new to Web Application Development and want to know why experts prefer this.

And also I want to thank you Dave Newton, for a wonderful book on Struts 2 (Apache Struts 2 - Web Application Development) for easy to understand language and example everywhere and that too in a small sized book.

Thank you Dave.
Ankit Garg

Joined: Aug 03, 2008
Posts: 9462

IDEs don't have any magical powers. They also use build scripts written in Ant/Mavan. IDEs have a standard build script that they provide you which you use without knowing. Custom build script gives you more control over the build process. Using IDE or custom build script both have their advantages and disadvantages...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Vikas K Gupta wrote:
I'm new to Web Application Development and want to know why experts prefer this.

Build scripts are portable, repeatable and self-contained. IDE builds are not.
When I or one of my employees creates a project, there are 3 requirements: a README.txt file that describes the project and how to build it, a script to configure the environment and an Ant build file. That way, when I want to check her work, I just run the environment script and the Ant build.
I don't have to try to figure out which JAR file is in her IDE's path but not in mine. I don't have to track down some third-party JAR she wedged into the WAR before deploying. I don't have to futz with my IDE to get the deploy task to go to the correct server.
IDE's are great if one is just throwing something together for fun or educational purposes. For a production environment, it is essential that one has a build process.
And source control.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Build types?
It's not a secret anymore!