1、安装svn插件2、安装maven插件3、编写settings.xml文件 1 <mirrors>
2
3 <mirror>
4 <id>aaa</id>
5 <mirrorOf>*</mirrorOf>
6 <url>http://192.168.1.5:8080/nexus/content/groups/public/</url>
7 </mirror>
8 </mirrors>
9
10 <profiles>
11 <profile>
12 <id>nexus</id>
13 <repositories>
14 <repository>
15 <id>nexus</id>
16 <name>local private nexus</name>
17 <url>http://192.168.1.5:8080/nexus/content/repositories/releases/</url>
18 <releases><enabled>true</enabled></releases>
19 <snapshots><enabled>true</enabled></snapshots>
20 </repository>
21 <repository>
22 <id>nexus</id>
23 <name>local private nexus</name>
24 <url>http://192.168.1.5:8080/nexus/content/repositories/snapshots/</url>
25 <releases><enabled>true</enabled></releases>
26 <snapshots><enabled>true</enabled></snapshots>
27 </repository>
28 </repositories>
29 <pluginRepositories>
30 <pluginRepository>
31 <id>nexus</id>
32 <name>local private nexus</name>
33 <url>http://192.168.1.5:8080/nexus/content/groups/public</url>
34 <releases><enabled>true</enabled></releases>
35 <snapshots><enabled>false</enabled></snapshots>
36 </pluginRepository>
37 </pluginRepositories>
38 </profile>
4、在eclipse->preferences-->maven-->user settings中将settings文件的完整路径配置上去5、配置好svn资源库位置6、选择new project--->maven--->checkout maven projects from scm,此时由于没有配置任何scm连接器,所以无法使用,因此先点选m2e marketplace选择安装连接器,在弹出的列表中选择m2e-subversion,继续按提示安装至成功7、选择new project--->maven--->checkout maven projects from scm,scm url中选择svn,然后在资源库位置中选择有pom.xml文件的maven项目,直接check下来即可。------------------------------------------------------------------------------------------------------------遇到的问题:1、pom.xml文件报错:根据错误提示进行修正,包括语法错误,还有容易忽略的错误就是settings.xml文件的配置错误2、项目的依赖jar文件缺失:首先要确定settings.xml文件配置是正确的,其次pom.xml配置的相应jar dependency正确------------------------------------------------------------------------------------------------------------8、发布maven项目到中央库:选中项目名,右键run as --> maven install 即可,看控制台信息进行调试9、更新maven项目依赖:选中项目名,右键maven---> update dependency即可