一、後臺上傳html
經過nexus後臺上傳第三方包: http://blog.csdn.net/huchunlinnk/article/details/17789175apache
上面上傳的只能上傳release版本maven
二、配置部署ui
能夠發佈release也能夠上傳snapshosts版本.url
在maven的目錄的全局配置settings.xml中增長對應的倉的管理認證spa
找到servers節點,增長snapshosts部署的帳號信息(管理員login帳號).net
在項目的pom中增長以下配置插件
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<url>http://tools.nexus.local.com/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
該配置文件來自code
說明:上面的pom中distributionManagement子節點snapshotRepository能夠有多個,每一個獨立的id,必須配置的和servers中server節點的id保證一直.server
同理能夠增長release版本的發佈配置:
<distributionManagement> <repository> <id>releases</id> <url>http://tools.nexus.local.com/nexus/content/repositories/releases</url> </repository> <snapshotRepository> <id>snapshots</id> <url>http://tools.nexus.local.com/nexus/content/repositories/snapshots</url> </snapshotRepository> </distributionManagement>
如圖爲mvn: clean install deploy 後倉庫中部署的jar
附錄:生成源代碼插件
<build>
<finalName>com-yyt-yim</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>dat</nonFilteredFileExtension>
</nonFilteredFileExtensions>
<outputDirectory />
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
轉載請註明出處:[http://www.cnblogs.com/dennisit/p/4597324.html]