psiroky commented on code in PR #180:
URL:
https://github.com/apache/maven-compiler-plugin/pull/180#discussion_r1121595369
##########
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java:
##########
@@ -1604,22 +1606,39 @@ private List<String> resolveProcessorPathEntries()
throws MojoExecutionException
}
}
- private List<Dependency> convertToDependencies(List<DependencyCoordinate>
annotationProcessorPaths) {
+ private List<Dependency> convertToDependencies(List<DependencyCoordinate>
annotationProcessorPaths)
+ throws MojoExecutionException {
List<Dependency> dependencies = new ArrayList<>();
for (DependencyCoordinate annotationProcessorPath :
annotationProcessorPaths) {
ArtifactHandler handler =
artifactHandlerManager.getArtifactHandler(annotationProcessorPath.getType());
+ String version = annotationProcessorPath.getVersion();
+ if (version == null) {
+ version = findManagedVersion(annotationProcessorPath)
+ .orElseThrow(
+ () -> new MojoExecutionException("Cannot find
version for " + annotationProcessorPath));
+ }
Review Comment:
Thinking about this again, this would probably mean we could not distinguish
between the 2 difference cases: version for the top-level path, and managed
versions for the transitive dependencies. Marking this as resolved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]