Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize template set snapshot version retrieval with resource detection #1657

Open
jan-vcapgemini opened this issue Mar 30, 2023 · 0 comments · May be fixed by #1694
Open

Optimize template set snapshot version retrieval with resource detection #1657

jan-vcapgemini opened this issue Mar 30, 2023 · 0 comments · May be fixed by #1694

Comments

@jan-vcapgemini
Copy link
Collaborator

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);

jan-vcapgemini added a commit to jan-vcapgemini/cobigen that referenced this issue Mar 30, 2023
added new determineSnapshotVersionFromResource method to Nexus2SearchResponse
adjusted createDownloadLink method in AbstractSearchResponse to handle snapshot versions too
jan-vcapgemini added a commit to jan-vcapgemini/cobigen that referenced this issue Jul 19, 2023
…w determineSnapshotVersionFromResource method to Nexus2SearchResponse adjusted createDownloadLink method in AbstractSearchResponse to handle snapshot versions too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant