MAVEN自动发布更新本地和远程仓库
1.本地仓库的更新
mvn clean -Dmaven.test.skip=true install
2.远程仓库的更新
mvn clean -Dmaven.test.skip=true deploy
3.打包到项目下
mvn clean package
4.跳过测试
-Dmaven.test.skip=true
mvn clean package install
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>