在maven.oschina上傳自有jar包

一  配置第三方庫html

maven.oschina目前把第三方構件放在了http://maven.oschina.net/content/repositories/thirdparty/下面,而且沒有配置到public group裏,因此在使用時須要另外指向鏡像地址:服務器

<mirror>
      <id>osc</id>
      <mirrorOf>central</mirrorOf>
      <name>Nexus osc</name>
      <url>http://maven.oschina.net/content/groups/public/</url>
    </mirror>
	<mirror>
      <id>osc-thirdparty</id>
      <mirrorOf>thirdparty</mirrorOf>
      <name>Nexus osc thirdparty</name>
      <url>http://maven.oschina.net/content/repositories/thirdparty/</url>
    </mirror>

而後配置倉庫:
maven

<profile>
		<id>my_nexus</id>
		<repositories>
			<repository>
				<id>my_repo</id>
				<name>my_repo</name>
				<url>http://maven.oschina.net/content/groups/public/</url>
				<releases>
					<enabled>true</enabled>
				</releases>
				<snapshots>
					<enabled>true</enabled>
				</snapshots>
			</repository>
			<repository>
				<id>my_3thparty_repo</id>
				<name>my_3thparty_repo</name>
				<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
				<releases>
					<enabled>true</enabled>
				</releases>
				<snapshots>
					<enabled>true</enabled>
				</snapshots>
			</repository>
		</repositories>
		<pluginRepositories>
			<pluginRepository>
				<id>my_plugin_repo</id>
				<name>my_plugin_repo</name>
				<url>http://maven.oschina.net/content/groups/public/</url>
				<releases>
					<enabled>true</enabled>
				</releases>
				<snapshots>
					<enabled>true</enabled>
				</snapshots>
			</pluginRepository>
		</pluginRepositories>
	</profile>
  </profiles>

二  上傳自有資源url

在http://maven.oschina.net/home.html頁面點擊上傳項目,進入受權頁,若是已經有oschina的帳號,則使用之登錄,而後在上傳頁面配置待上傳資源:.net

點擊「提交」後,頁面提示上傳成功的信息。若是沒有及時提示也不要着急,等待會就行了(有時服務器不在狀態)。code

上傳後,通常狀況下立刻能夠找到剛纔上傳的jar文件,可是也有服務器偷懶的狀況,等幾分鐘就行了,如:xml

相關文章
相關標籤/搜索