1.本地仓库 的更新
mvn clean package install
2.远程 仓库 的更新
mvn clean package deploy
2.1工程文件pom.xml的设置
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven .plugins</groupId>
<artifactId>maven -compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<extensions>
<extension>
<groupId>org.apache.maven .wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-alpha-6</version>
</extension>
</extensions>
</build>
<repositories>
<repository>
<id>cdc-respository</id>
<name>cdc-respository</name>
<url>http://xxx.xxx.xxx.xx:8080/Maven 2Repository</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>cdc-plugin-respository</id>
<name>cdc-plugin-respository</name>
<url>http://xxx.xxx.xxx.xxx:8080/Maven 2Repository</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>my-deploy-respository</id>
<name>cdc-plugin-respository</name>
<url>ftp://192.168.2.177/home/mfguser/Maven 2Repository</url>
</repository>
</distributionManagement>
2.2本地用户setting.xml文件的设定 settings.xml
<server>
<id>my-deploy-respository</id>
<username>user</username>
<password>password</password>
</server>