Skip to content

Optimize template set snapshot version retrieval with resource detection  #1657

@jan-vcapgemini

Description

@jan-vcapgemini

The ArtifactRetriever should use the resource xml to determine the full snapshot version instead of the redirect url.

Link to resource xml:
https://s01.oss.sonatype.org/service/local/repositories/snapshots/content/com/devonfw/cobigen/templates/crud-openapi-angular-client-app/2021.12.007-SNAPSHOT/

Code part to change:

// Check for full SNAPSHOT version link
if (item.getVersion().contains("-SNAPSHOT")) {
URL snapShotUrl = new URL(MavenSearchRepositoryConstants.NEXUS2_REPOSITORY_URL + "/"
+ MavenSearchRepositoryConstants.NEXUS2_SNAPSHOT_REPOSITORY_LINK + "?r=snapshots" + "&g="
+ item.getGroupId() + "&a=" + item.getArtifactId() + "&v=" + item.getVersion() + "&e="
+ artifactLink.getExtension() + "&c=" + artifactLink.getClassifier());
downloadLinks.add(snapShotUrl);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions