Skip to content
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

Warning since Gradle 7.x: Execution optimizations have been disabled for task ':processResources' #38

Open
bwaldvogel opened this issue Nov 22, 2021 · 1 comment

Comments

@bwaldvogel
Copy link

bwaldvogel commented Nov 22, 2021

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
@bwaldvogel bwaldvogel changed the title Warning since Gradle 7.3: Execution optimizations have been disabled for task ':processResources' Warning since Gradle 7.x: Execution optimizations have been disabled for task ':processResources' Nov 23, 2021
@henning-meinhardt
Copy link

henning-meinhardt commented Jan 24, 2022

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) ...```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants