maven发布:使用artifactory部署子步骤准备失败

时间:2015-04-01 15:13:22

标签: maven deployment connection release artifactory

现在研究了几天,接近自杀倾向,我的问题真的很希望我自己找到问题太傻了....

设置:windows7 / maven 3.2.3 / jdk 1.7.0_60(64bit)/ artifactory 3.5.0 问题: - mvn clean install deploy - >作品 - mvn release:prepare - >作品 - mvn release:在子步骤部署中执行失败(如前所述,它独立运行) - 对我来说,POM.XML和settings.xml(用于测试我从神器中取出了预生成的)。但是我把它们进一步向下...... thnx提前获得任何帮助!

欢呼声 学家

日志:

    .....
    [INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ apps.hr ---
    [INFO] Uploading: http://vm-local-repo.fernbach-lu.dom:8081/artifactory/libs-release-local/com/fernbach/apps.hr/0.1.4/apps.hr-0.1.4.war
    [INFO] 2/75918 KB
    [INFO] 4/75918 KB
    [INFO] 6/75918 KB
    [INFO] 8/75918 KB
    ....
    [INFO] 60/75918 KB
    [INFO] Apr 01, 2015 4:56:30 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
    [INFO] 62/75918 KB
    [INFO] INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
    [INFO] 64/75918 KB
    [INFO] Apr 01, 2015 4:56:30 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
    [INFO] INFO: Retrying request
    [INFO] 66/75918 KB
    [INFO] Apr 01, 2015 4:56:30 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
    [INFO] 68/75918 KB
.....
.....
[INFO] 390/75918 KB
[INFO] 392/75918 KB
[INFO]
[INFO] Uploading: http://vm-local-repo.fernbach-lu.dom:8081/artifactory/libs-release-local/com/fernbach/apps.hr/0.1.4/apps.hr-0.1.4.pom
[INFO] 2/2 KB
[INFO]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 23.043 s
[INFO] [INFO] Finished at: 2015-04-01T16:56:30+02:00
[INFO] [INFO] Final Memory: 47M/366M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project apps.hr: Failed to
 deploy artifacts: Could not transfer artifact com.fernbach:apps.hr:war:0.1.4 from/to fs-releases (http://vm-local-repo.fernbach-lu.dom:8081
/artifactory/libs-release-local): Connection reset by peer: socket write error -> [Help 1]
...

的Settings.XML

    ?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <localRepository>d:/fr4/maven/repo</localRepository>
  <servers>
    <server>
      <username>jus</username>
      <password>AP6XtRyuPNMVbXfnzP9BopSDp66</password>
      <id>central</id>
    </server>
    <server>
      <username>jus</username>
      <password>AP6XtRyuPNMVbXfnzP9BopSDp66</password>
      <id>snapshots</id>
    </server>
  </servers>
  <profiles>
    <profile>
      <repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>libs-release</name>
          <url>http://vm-local-repo:8081/artifactory/libs-release</url>
        </repository>
        <repository>
          <snapshots />
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>http://vm-local-repo:8081/artifactory/libs-snapshot</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>plugins-release</name>
          <url>http://vm-local-repo:8081/artifactory/plugins-release</url>
        </pluginRepository>
        <pluginRepository>
          <snapshots />
          <id>snapshots</id>
          <name>plugins-snapshot</name>
          <url>http://vm-local-repo:8081/artifactory/plugins-snapshot</url>
        </pluginRepository>
      </pluginRepositories>
      <id>artifactory</id>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>artifactory</activeProfile>
  </activeProfiles>
</settings>

的pom.xml

http://maven.apache.org/xsd/maven-4.0.0.xsd">         4.0.0

    <parent>
        <groupId>com.fernbach</groupId>
        <artifactId>fernbach.parent</artifactId>
        <version>1.0.0</version>
    </parent>

    <artifactId>apps.hr</artifactId>
    <version>0.1.5-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>HR</name>

    <properties>
        <foundation.version>1.0.0</foundation.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>com.fernbach</groupId>
            <artifactId>foundation.core</artifactId>
            <version>${foundation.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fernbach</groupId>
            <artifactId>foundation.web</artifactId>
            <version>${foundation.version}</version>
        </dependency>

    </dependencies>

    <scm>
        <developerConnection>scm:svn:http://vm-uranus1.fernbach-lu.dom/svn/fernbach-R4/apps/hr/branches/BRANCH_0.1.1</developerConnection>
        <url>scm:svn:http://vm-uranus1.fernbach-lu.dom/svn/fernbach-R4/apps/hr/branches/BRANCH_0.1.1</url>
    </scm>

</project>

1 个答案:

答案 0 :(得分:0)

我终于在针对版本3.2.3报告的Maven Bug的评论中找到了解决方案。

这是错误:https://issues.apache.org/jira/browse/MNG-5684

问题是maven-source-plugin用于将源jar附加到项目中。更确切地说,这是导致这种行为的无叉目标。使用这些目标,部署插件会尝试上传两次因源存储库限制而失败的源jar。

解决方案可以省略source-plugin(但之后就不再有附加源)或者使用forked目标(jar和test-jar)。

我现在使用maven 3.3.3的分叉目标,我可以再次发布项目。