-
Notifications
You must be signed in to change notification settings - Fork 34
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
Conversation
Increase Maven requirement to 3.5.0 (Resolver 1.0.3) Enforce minimum Maven version via prerequisite This closes policeman-tools#223
09cb592
to
6e688fb
Compare
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); |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
I can confirm that this resolves the warning described in #223 👍 |
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. |
Increase Maven requirement to 3.5.0 (Resolver 1.0.3) Enforce minimum Maven version via prerequisite
This closes #223