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

Commit

Permalink
Issue #5 Use release style URL as fallback for snapshot artifacts
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Alexander Constantin committed Apr 3, 2017
1 parent 508aada commit 9142511
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

group=com.rbmhtechnology
name=apidoc-server
version=1.0.2
version=1.0.3-SNAPSHOT
javaVersion=1.8

# #########################################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,10 @@ private String getApidocFileNameFromMetadataXML(ArtifactIdentifier artifactIdent
throw new RepositoryException("Could not parse maven-metadata.xml for '" + artifactIdentifier + "'", e);
}

throw new RepositoryException("Could not determine snapshot apidoc file name!");
// in case of a snapshot which has no reliable information coming from
// maven-metadata.xml simply use the pattern for releases
return artifactIdentifier.getArtifactId() + "-" + artifactIdentifier.getVersion() + "-"
+ artifactIdentifier.getClassifier() + ".jar";
}

/**
Expand Down

0 comments on commit 9142511

Please sign in to comment.