Skip to content

Commit

Permalink
Merge pull request #23881 from glefloch/fix/23776
Browse files Browse the repository at this point in the history
Use a copy of compile classpath for panache annotation processor lookup
  • Loading branch information
glefloch authored Feb 23, 2022
2 parents 7b574cd + d52bc65 commit ce6662b
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ public static void initConfigurations(Project project) {
configContainer.getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME));

// enable the Panache annotation processor on the classpath, if it's found among the dependencies
configContainer.getByName(JavaPlugin.ANNOTATION_PROCESSOR_CONFIGURATION_NAME).getIncoming()
.beforeResolve(annotationProcessors -> {
Set<ResolvedArtifact> compileClasspathArtifacts = configContainer
.getByName(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME).getResolvedConfiguration()
configContainer.getByName(JavaPlugin.ANNOTATION_PROCESSOR_CONFIGURATION_NAME)
.withDependencies(annotationProcessors -> {
Set<ResolvedArtifact> compileClasspathArtifacts = DependencyUtils
.duplicateConfiguration(project, configContainer
.getByName(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME))
.getResolvedConfiguration()
.getResolvedArtifacts();
for (ResolvedArtifact artifact : compileClasspathArtifacts) {
if ("quarkus-panache-common".equals(artifact.getName())
Expand Down

0 comments on commit ce6662b

Please sign in to comment.