Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Inconsistant War deployment error

Help
nodje
2008-09-30
2013-04-05
  • nodje
    nodje
    2008-09-30

    Hi

    I'm trying to fix a "Error deploying artifact: Error transferring file" that seems to occur only with wars (and not all of them! damn...)

    I'm now using a parent pom.xml for deployment which basically contains:
    <distributionManagement>
            <repository>
                <id>central</id>
                <name>artifactory central</name>
                <url>${repository.path}/artifactory/libs-releases</url>
            </repository>
            <snapshotRepository>
                <id>snapshots</id>
                <name>artifactory snapshots</name>
                <url>${repository.path}/artifactory/libs-snapshots</url>
            </snapshotRepository>
        </distributionManagement>

    It works great for all my dependencies Jar projects. It also works with an empty-maven-created war project, with this pom for instance:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>

        <parent>
            <groupId>com.company</groupId>
            <artifactId>company-parent</artifactId>
            <version>2-SNAPSHOT</version>
        </parent>

      <groupId>com.company.client</groupId>
      <artifactId>test</artifactId>
      <packaging>war</packaging>
      <version>1.0-SNAPSHOT</version>

      <name>test Maven Webapp</name>

      <url>http://maven.apache.org</url>

      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
      </dependencies>

      <build>
        <finalName>test</finalName>
      </build>
    </project>

    But it wouldn't work with my own war projects - which in my view have a quite similar pom.xml, except for the dependencies.

    I get the error at the first upload, the war itself, and only after the transfer has occured:
    [INFO] repository metadata for: 'snapshot com.company.client:web-alpha2:1.3-SNAPSHOT' could not be found on repository: snapshots, so will be created
    Uploading: http://company.dyndns.org:8081/artifactory/libs-snapshots/com/company/client/web-alpha2/1.3-SNAPSHOT/web-alpha2-1.3-20080930.045357-1.war
    18410K uploaded
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Error deploying artifact: Error transferring file

    Error writing to server

    I'm about to upgrade to 1.3.X but I'm doubting it will solve my problem, as it SHOULD work!
    An extract from the empty test.war project deploy:

    [INFO] Retrieving previous build number from snapshots
    [INFO] repository metadata for: 'snapshot com.company.client:test:1.0-SNAPSHOT' could not be found on repository: snapshots, so will be created
    Uploading: http://company.dyndns.org:8081/artifactory/libs-snapshots/com/company/client/test/1.0-SNAPSHOT/test-1.0-20080930.052142-1.war
    58K uploaded
    [INFO] Retrieving previous metadata from snapshots
    [INFO] repository metadata for: 'artifact com.company.client:test' could not be found on repository: snapshots, so will be created
    [INFO] Uploading repository metadata for: 'artifact com.company.client:test'
    [INFO] Uploading project information for test 1.0-20080930.052142-1
    [INFO] Retrieving previous metadata from snapshots
    [INFO] repository metadata for: 'snapshot com.company.client:test:1.0-SNAPSHOT' could not be found on repository: snapshots, so will be created
    [INFO] Uploading repository metadata for: 'snapshot com.company.client:test:1.0-SNAPSHOT'
    [INFO] Retrieving previous build number from snapshots
    Uploading: http://company.dyndns.org:8081/artifactory/libs-snapshots/com/company/client/test/1.0-SNAPSHOT/test-1.0-20080930.052142-1-sources.jar
    319b uploaded
    [INFO] Retrieving previous build number from snapshots
    Uploading: http://company.dyndns.org:8081/artifactory/libs-snapshots/com/company/client/test/1.0-SNAPSHOT/test-1.0-20080930.052142-1-test-sources.jar
    319b uploaded

    Could it be a network problem due to the size of the war?

    cheers

     
    • nodje
      nodje
      2008-09-30

      It works on a machine located on the same subnet as artifactory, using the public company.dyndns.org address...

      :(
      Does it seems like a network problem could be the cause?