theJava
theJava

Reputation: 15034

Basic Question over adding libraries to project

  1. I create a new project named XXX using Maven.
  2. I do mvn eclipse:eclipse to to ensure it gets imported to Eclipse.

Now i am going to indite a Spring and Hibernate application. I need jars to be added. Where should i add them and How?

Please explain me in lame man language.

Upvotes: 0

Views: 57

Answers (2)

Robin
Robin

Reputation: 24262

Add them in your maven pom, then regenerate your project as you did originally. Don't try to maintain dependencies in the project and your pom, as this will lead to inconsistencies.

As a better alternative, use the M2Eclipse plugin instead and then your eclipse and maven environments will be actually integrated.

Upvotes: 1

bmargulies
bmargulies

Reputation: 100051

First you do what you'd always do in Maven. Add to the <dependencies/> element of your POM.

Then you re-rerun eclipse to get a new .classpath with the new stuff in it.

Upvotes: 1

Related Questions