无法发布:执行

时间:2014-10-09 11:52:21

标签: git maven jenkins nexus

我正在为新工件创建管道,并希望在真实环境中创建Jenkins作业之前在本地测试它。

配置如下:本地目录为git repo,Nexus在docker中运行。

我能够执行mvn release:prepare -DautoVersionSubmodules=true -DdevelopmentVersion=1.15.0 -DpushChanges=true -DreleaseVersion=1.14.0 -Dtag=v1.14.0

它很好,在我的poms中更新了版本。没关系。

我能够mvn deploy快照我的Nexus。确定。

我无法制作mvn release:perform,每次失败都会出现不同的错误。现在我坚持这个:Failed to deploy artifacts/metadata: No connector available to access repository releases (${url}) of type default using the available factories WagonRepositoryConnectorFactory

我的配置是:

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>

在构建部分我也有:

 <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.xml:

<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"

0 个答案:

没有答案