gradle-xjc-plugin
gradle-xjc-plugin copied to clipboard
Warning since Gradle 7.x: Execution optimizations have been disabled for task ':processResources'
I’m using the XJC Gradle plugin (version 2.0.0
) with the configuration
sourceSets {
main {
xjcCatalog.srcDir("my/package")
xjcTargetPackage = "my.package"
}
}
xjc {
extension = true
}
After upgrading Gradle from 6.x to 7.x, I get the following new warning when assembling the project via ./gradlew assemble
:
> Task :processResources
Execution optimizations have been disabled for task ':processResources' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: 'my-project/build/generated/resources'. Reason: Task ':processResources' uses this output of task ':xjcGenerate' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: 'my-project/build/generated/resources/xjc/main'. Reason: Task ':processResources' uses this output of task ':xjcGenerate' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
To hide the warning, I declared an explicit task dependency as a temporary workaround:
processResources.dependsOn xjcGenerate, xjcGenerateTest
same problem here, even worse: when having multiple xjc configurations, gradle complains about circular dependencies among them. the workaround given above unfortunately does not work for me.
Execution optimizations have been disabled for task ':core:xjcFormFolder' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '...'. Reason: Task ':core:xjcFormFolder' uses this output of task ':core:xjcConfiguration' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '...'. Reason: Task ':core:xjcConfiguration' uses this output of task ':core:xjcFormFolder' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Gradle detected a problem with the following location: '...'. Reason: Task ':core:xjcFormFolder' uses this output of task ':core:xjcConfiguration' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimizations are disabled to ensure correctness. See https://docs.gradle.org/7.3.3/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.
Gradle detected a problem with the following location: '...'. Reason: Task ':core:xjcConfiguration' uses this output of task ':core:xjcFormFolder' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implicit_dependency for more details about this problem. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. Execution optimizations are disabled to ensure correctness. See https://docs.gradle.org/7.3.3/userguide/more_about_tasks.html#sec:up_to_date_checks for more details.
Running XJC compiler for schema(s) ...```