• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

including frameworks inside projects inside IDE

 
Tomasz Ducin
Greenhorn
Posts: 10
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 5590
55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, that sounds great. As far as I know Maven is the descendant of Ant, right?
 
Stephan van Hulst
Bartender
Pie
Posts: 5590
55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your answer. This Maven reminds me of PHP's composer and packagist.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic