Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Snapshot artefacts which insufficient information provided in maven-metadata.xml fail to download #5

Closed
aconstantin opened this issue Apr 2, 2017 · 0 comments

Comments

@aconstantin
Copy link
Contributor

In case a snapshot artefact is simply pushed in the fashion of a release artefact to a maven repository it lacks some information about the available snapshots and filenames in the maven-metadata.xml.

An example for such a case

<metadata modelVersion="1.1.0">
  <groupId>com.rbmhtechnology.example</groupId>
  <artifactId>example-docs</artifactId>
  <version>1.5-SNAPSHOT</version>
  <versioning>
    <lastUpdated>20170402093439</lastUpdated>
  </versioning>
</metadata>

A proper snapshot maven-metadata.xml would look like this

<metadata modelVersion="1.1.0">
  <groupId>com.rbmhtechnology.example</groupId>
  <artifactId>example-docs</artifactId>
  <version>0.20.0-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20160407.074958</timestamp>
      <buildNumber>6</buildNumber>
    </snapshot>
    <lastUpdated>20160407222835</lastUpdated>
    <snapshotVersions>
      <snapshotVersion>
        <classifier>javadoc</classifier>
        <extension>jar</extension>
        <value>0.20.0-20160407.074958-6</value>
        <updated>20160407074958</updated>
      </snapshotVersion>
      <snapshotVersion>
        <classifier>sources</classifier>
        <extension>jar</extension>
        <value>0.20.0-20160407.074958-6</value>
        <updated>20160407074958</updated>
      </snapshotVersion>
      <snapshotVersion>
        <extension>jar</extension>
        <value>0.20.0-20160407.074958-6</value>
        <updated>20160407074958</updated>
      </snapshotVersion>
      <snapshotVersion>
        <extension>pom</extension>
        <value>0.20.0-20160407.074958-6</value>
        <updated>20160407074958</updated>
      </snapshotVersion>
    </snapshotVersions>
  </versioning>
</metadata>

Currently we require the latter to construct the appropriate download url for a certain classifier.

If this is not available, the apidoc server simply fails constructing the url.

This should be changed, that the fallback in such cases (lacking the required information for snapshots) is a standard release style URL.

aconstantin pushed a commit that referenced this issue Apr 2, 2017
Use release style URL as fallback for snapshot artifacts  in case of information missing in maven-metadata.xml.
Normally we require information about classifieres and most recent snapshot version to construct the download url
aconstantin pushed a commit that referenced this issue Apr 3, 2017
Use release style URL as fallback for snapshot artifacts  in case of information missing in maven-metadata.xml.
Normally we require information about classifieres and most recent snapshot version to construct the download url
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant