Git 无法执行mvn发布:执行
我正在为新工件创建管道,并希望在真实环境中创建Jenkins作业之前在本地对其进行测试 接下来是配置:本地目录为git repo,Nexus在docker中运行 我能够执行Git 无法执行mvn发布:执行,git,maven,jenkins,nexus,Git,Maven,Jenkins,Nexus,我正在为新工件创建管道,并希望在真实环境中创建Jenkins作业之前在本地对其进行测试 接下来是配置:本地目录为git repo,Nexus在docker中运行 我能够执行mvn发行版:prepare-DautoVersionSubmodules=true-DdevelopmentVersion=1.15.0-DpushChanges=true-dreleaservision=1.14.0-Dtag=v1.14.0 很好,我的poms中有更新版本。没关系 我能够mvn将SNAPSHOT部署到我的
mvn发行版:prepare-DautoVersionSubmodules=true-DdevelopmentVersion=1.15.0-DpushChanges=true-dreleaservision=1.14.0-Dtag=v1.14.0
很好,我的poms中有更新版本。没关系
我能够mvn将
SNAPSHOT部署到我的Nexus。嗯
我无法进行mvn发布:执行
,每次都会出现不同的错误。现在我陷入了这样的困境:未能部署工件/元数据:没有可用的连接器来使用可用的工厂WagonRepositoryConnectorFactory访问默认类型的存储库版本(${url})
我的配置是:
pom.xml
<scm>
<connection>scm:git:/Users/fau/Documents/work/localgit/reponame/</connection>
<developerConnection>scm:git:/Users/fau/Documents/work/localgit/reponame/</developerConnection>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://192.168.59.103:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://192.168.59.103:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
为什么在mvn:prepare和mvn:perform之间运行部署?如果“准备”成功,“执行”将把发布部署到回购。顺便问一下,为什么您的“nextDevVersion”不是一个“快照”(1.15.0)?发布的顺序很简单:
mvn发布:准备
,然后mvn发布:执行
无需其他任何操作。所有其他部署等都将自动处理。顺便说一句,我建议使用maven-release-plugin的最新插件版本(2.5.1)。可能与
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<tagNameFormat>v@{project.version}</tagNameFormat>
<autoVersionSubmodules>true</autoVersionSubmodules>
<releaseProfiles>myprofile</releaseProfiles>
</configuration>
</plugin>
<settings>
<servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<profiles>
<profile>
<id>myprofile</id>
<properties>
<repositoryId>releases</repositoryId>
<repositoryUrl> http://192.168.59.103:8081/nexus/content/repositories/releases/</repositoryUrl>
<snapshotsRepositoryId>snapshots</snapshotsRepositoryId>
<snapshotsUrl>http://192.168.59.103:8081/nexus/content/repositories/snapshots/</snapshotsUrl>
</properties>
<repositories>
<repository>
<id>releases</id> <url>http://192.168.59.103:8081/nexus/content/repositories/releases/</url>
</repository>
<repository>
<id>snapshots</id>
<url>http://192.168.59.103:8081/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>myprofile</activeProfile>
</activeProfiles>
</settings>
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T17:51:42+04:00)
Maven home: /usr/local/Cellar/maven/3.2.2/libexec
Java version: 1.8.0_05, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10", arch: "x86_64", family: "mac"