读书人

Eclipse 中运用 mvn 管理java project

发布时间: 2012-09-09 09:27:54 作者: rapoo

Eclipse 中使用 mvn 管理java project
1. install mvn:
sudo apt-get install maven2

2. install mvn plugin in eclipse:
http://m2eclipse.sonatype.org/sites/m2e

3. get pom.xml file
you can write the pom.xml by yourself or download existing file from SCM server

4. generate the eclipse project files from pom.xml
mvn eclipse:eclipse
or:
mvn -DdownloadSources=true -DdownloadJavadocs=true -DoutputDirectory=target/eclipse-classes eclipse:eclipse

5. import project from eclipse

now you can get all the dependency jar files and make the project compiled.




读书人网 >Eclipse开发

热点推荐