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

Use Maven Resolver API #230

Merged
merged 2 commits into from
May 20, 2023
Merged

Conversation

kwin
Copy link
Contributor

@kwin kwin commented Apr 8, 2023

Increase Maven requirement to 3.5.0 (Resolver 1.0.3) Enforce minimum Maven version via prerequisite

This closes #223

Increase Maven requirement to 3.5.0 (Resolver 1.0.3)
Enforce minimum Maven version via prerequisite

This closes policeman-tools#223
@kwin kwin force-pushed the feature/resolver-api branch from 09cb592 to 6e688fb Compare April 8, 2023 14:27
if (groupId == null || artifactId == null || version == null || type == null) {
throw new NullPointerException("signaturesArtifact is missing some properties. Required are: groupId, artifactId, version, type");
}
return artifactFactory.createArtifactWithClassifier(groupId, artifactId, version, type, classifier);
return new DefaultArtifact(groupId, artifactId, classifier, type, version);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as long as type = extension no additional mapper needed, otherwise you need to inject https://maven.apache.org/ref/3.5.0/maven-core/apidocs/org/apache/maven/artifact/handler/manager/ArtifactHandlerManager.html and retrieve the ArtifactHandler for the given type to resolve its extension.

@Parameter(defaultValue = "${repositorySystemSession}", readonly = true, required = true)
private RepositorySystemSession repoSession;

@Parameter(defaultValue = "${project.remoteProjectRepositories}", readonly = true, required = true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that ${project.remotePluginRepositories} would be semantically correct, but you always used the project repository to resolve signature artifacts.

@Stephan202
Copy link
Contributor

I can confirm that this resolves the warning described in #223 👍

ivy.xml Show resolved Hide resolved
@uschindler uschindler self-assigned this May 20, 2023
@uschindler uschindler added this to the 3.6 milestone May 20, 2023
@uschindler uschindler merged commit f7d2581 into policeman-tools:main May 20, 2023
@uschindler
Copy link
Member

I need to fix the build. Tests do not run!

Did you ever run the testsuite? There are Maven 2 tests now running with Maven 3 (need to be removed).

I fixed this now in main branch. The build actually works, but there a lot to update as the minimum Maven version changed. The documentation about that is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

build warning about parameter "localRepository" after upgrading to maven 3.9.1
4 participants