You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Shaun Senecal <Sh...@tradingscreen.com> on 2009/02/17 07:52:44 UTC

latest SNAPSHOT not being downloaded

I am using an Archiva 1.1.3 instance as a local mirror for our internal
Maven 2 repository and the Maven Central repository.  The problem we are
seeing is that anyone who uses the Archiva mirror sporadically will not
receive the most recent SNAPSHOTs when building.  After debugging into
the Maven source to see what was happening, it appears that the problem
is that the maven-metadata-archiva-mirror.xml file contains the
incorrect buildNumber and no lastUpdated date.  Due to this, Maven
decides that the local copy is more recent than the mirrors copy, so a
new version is not downloaded.

What we see (sorry, it's a little verbose):

maven-metadata-archiva-mirror.xml found in the user's local repository
contains:

<?xml version="1.0" encoding="UTF-8"?>

<metadata>
  <groupId>company.module</groupId>
  <artifactId>share</artifactId>
  <version>1.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <buildNumber>0</buildNumber>
    </snapshot>
  </versioning>
</metadata>


maven-metadata.xml found on our internal Maven 2 repository contains:

<?xml version="1.0" encoding="UTF-8"?><metadata>
  <groupId>company.module</groupId>
  <artifactId>share</artifactId>
  <version>1.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <buildNumber>20</buildNumber>
    </snapshot>
    <lastUpdated>20090216053130</lastUpdated>
  </versioning>
</metadata>


maven-metadata-internal-repos.xml found on our Archiva contains:

<?xml version="1.0" encoding="UTF-8"?><metadata>
  <groupId>company.module</groupId>
  <artifactId>share</artifactId>
  <version>1.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <buildNumber>20</buildNumber>
    </snapshot>
    <lastUpdated>20090216053130</lastUpdated>
  </versioning>
</metadata>


maven-metadata.xml found on our Archiva contains:

<?xml version="1.0" encoding="UTF-8"?>

<metadata>
  <groupId>company.module</groupId>
  <artifactId>share</artifactId>
  <version>1.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <buildNumber>0</buildNumber>
    </snapshot>
  </versioning>
</metadata>


Does anyone have any idea why Archia might be dropping the buildNumber
and lastUpdated dates from the metadata XML files?  It is clearly
receiving the correct file from the Internal Repository, but for some
reason it then serves an invalid file out to the clients.



Thanks,

Shaun