This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes including frameworks inside projects inside IDE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "including frameworks inside projects inside IDE" Watch "including frameworks inside projects inside IDE" New topic
Author

including frameworks inside projects inside IDE

Tomasz Ducin
Greenhorn

Joined: Jan 22, 2013
Posts: 10

I'm developing a spring3 project and decided to include tiles3 there. I have downloaded tiles3.0.1 (latest stable) and created an IDE Library inside my NetBeans IDE. I thought that .war files shuld be kept as small as possible so I'd just incude only those .jar files which are needed. This resulted in reading tomcat logs most of the time and including more and more jars (NoClassDefFound exceptions). Finally, I added all jar files and continued to develop the application in peace .

Since I'm a JEE newbie, this could have been not such a good idea ;). What do you think? What are your practices?
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3599
    
  14

Maven.

If you use Maven as your project management tool, it will automatically download everything your project depends on, and it provides a lot of other nifty features.

If you are working with NetBeans, Maven comes pre-installed. For Eclipse, there should be plenty of Maven plugins (such as m2e). Just create a new Maven project, or convert your existing project to a Maven project. Then you can add dependencies, and Maven will automatically find all the jars that your project needs.
Tomasz Ducin
Greenhorn

Joined: Jan 22, 2013
Posts: 10

Well, that sounds great. As far as I know Maven is the descendant of Ant, right?
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3599
    
  14

Not completely. Maven is much more than Ant. Ant is a build tool that is mostly used to automate the building process of your project. Maven on the other hand 'describes' your project layout. Ant can be used to finetune the building process, while Maven is used for the overal project lifecycle. Most of what Ant can do, Maven can do as well though.

It's simple: In NetBeans, create a new Maven project, give it a group id (something like "com.organization"), artifact id ("myproject") and version. Then you can add dependencies to existing Maven projects, most of which you can find in the central Maven repository: http://search.maven.org/
Tomasz Ducin
Greenhorn

Joined: Jan 22, 2013
Posts: 10

Thanks for your answer. This Maven reminds me of PHP's composer and packagist.
 
 
subject: including frameworks inside projects inside IDE
 
Similar Threads
Between /lib and /web/WEB-INF/lib
Not able to load swingX component class
How to place my pictures which is in my html inside ide?
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config, but I included the jstl jars
Can JBoss Rules be of any use?