微同商城 搭建私服
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy (default-deploy) on project platform: Failed to deploy artifacts: Could n
ot find artifact com.platform:platform:pom:1.0.0 in releases(http://nkf:
8081/repository/xiaowang-host/) -> [Help 1]
<modelVersion>4.0.0</modelVersion>
<groupId>com.platform</groupId>
<artifactId>platform</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<description>platform</description>
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy (default-deploy) on project platform: Deployment failed: repository eleme
nt was not specified in the POM inside distributionManagement element or in -Dal
tDeploymentRepository=id::layout::url parameter -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy (default-deploy) on project platform-mp: Failed to deploy artifacts: Coul
d not find artifact com.platform:platform-mp:jar:1.0.0 in releases (http:
//nkf:8081/repository/xiaowang-host/) -> [Help 1]
搭建私服
D:\public\mvn\apache-maven-3.2.2\conf\settings.xml
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
阿里倉(cāng)庫(kù)改為中央倉(cāng)庫(kù)
N:\JetBrains\platform\pom.xml
解決上傳第二方j(luò)ar文件和下載第二方j(luò)ar文件問題:
<distributionManagement>
<repository>
<id>releases.xiaowang</id>
<name>Releases</name>
<url>http://server2:8081/repository/xiaowang-host/</url>
</repository>
<snapshotRepository>
<id>snapshots.xiaowang</id>
<name>Snapshot</name>
<url>http://server2:8081/repository/xiaowang-host/</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>releases.xiaowang</id>
<url>http://server2:8081/repository/xiaowang-host/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
其它pom.xml文件無(wú)需做改變,就可以使用mvn deploy 上傳和下載第二方j(luò)ar文件
然后使用mvn package 就沒有問題了。