-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 a copy of compile classpath for panache annotation processor lookup #23881
Conversation
Set<ResolvedArtifact> compileClasspathArtifacts = configContainer | ||
.getByName(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME).getResolvedConfiguration() | ||
configContainer.getByName(JavaPlugin.ANNOTATION_PROCESSOR_CONFIGURATION_NAME) | ||
.defaultDependencies(annotationProcessors -> { |
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.
Could you please explain the reason for changing to the defaultDependencies(...)
here? The javadoc says
Execute the given action if the configuration has no defined dependencies when it first participates in dependency resolution.
Would it still work if there already are some default dependencies and the quarkus-panache-common
is not among them?
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 followed the error message but as you mentioned this is not what we are looking for.
The withDependencies
should be ok. I will give it a try.
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 replace the defaultDependencies
by the withDependencies
which always runs before dependency resolution.
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 3ec017e
Full information is available in the Build summary check run. Failures⚙️ Gradle Tests - JDK 11 #- Failing: integration-tests/gradle
📦 integration-tests/gradle✖
⚙️ Gradle Tests - JDK 11 Windows #- Failing: integration-tests/gradle
📦 integration-tests/gradle✖
|
I wasn't able to backport this one as the modified file is just not around in 2.7. If we want this in 2.7, we need a specific backport targeting the 2.7 branch. |
This change looks for panache dependency on a copy of the compile classpath instead of the real compile classpath.
In some case, the
annotationProcessor
configuration is configured to extendcompileOnly
configuration. When looking up for thequarkus-panache-common
dependency, we resolve theCOMPILE_CLASSPATH
which then make it impossible to add a dependency to theannotationProcessor
configuration as a part as already been resolved.close #23776