开发者

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 g开发者_JS百科ets 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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜