I am trying to build Spring Boot main against a local change in Spring Framework main. This leads to the following exception:

 $ ./gradlew build --include-build ../../spring-framework/main

> Task :buildSrc:compileJava
Note: /Users/snicoll/workspace/work/spring-boot/main/buildSrc/src/main/java/org/springframework/boot/build/context/properties/ConfigurationPropertiesPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':spring-boot-project:spring-boot:checkTestCompileClasspathForProhibitedDependencies'.
> Could not resolve all task dependencies for configuration ':spring-boot-project:spring-boot:testCompileClasspath'.
   > Could not find com.thoughtworks.qdox:qdox:.
     Required by:
         project :spring-boot-project:spring-boot > project :main:spring-core-test

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 27s
48 actionable tasks: 40 executed, 3 from cache, 5 up-to-date

Comment From: wilkinsona

This needs to be addressed in Spring Framework's build. The problem is that the version constraints in Framework's build are configured in such a way that they're not visible to the including build. That could be related to the dependency management plugin and some limitations in Gradle. Ideally, Framework wouldn't use the dependency management plugin any more as Gradle's built-in capabilities (which we use in Boot's build) are more than adequate now.

Comment From: snicoll

Thanks Andy, I am moving this to the framework issue tracker.

Comment From: wilkinsona

If the team are interested, I would be happy to contribute the necessary changes to move from the dependency management plugin to Gradle's built-in platform support.

Comment From: snicoll

Yes please, thanks for the offer!

Comment From: bclozel

Closing in favor of #29045

Comment From: izeye

It still doesn't seem to work with the same failure in the opening comment.

Comment From: snicoll

@izeye thanks for the feedback. I am unable to reproduce the problem. Can you share the command you're using?

Comment From: wilkinsona

I thought I had tested this and it worked, but I can reproduce it:

./gradlew build --include-build ../../spring-framework     

> Task :buildSrc:compileJava
Note: /Users/awilkinson/dev/spring-projects/spring-boot/main/buildSrc/src/main/java/org/springframework/boot/build/context/properties/ConfigurationPropertiesPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':spring-boot-project:spring-boot:checkTestRuntimeClasspathForProhibitedDependencies'.
> Could not resolve all task dependencies for configuration ':spring-boot-project:spring-boot:testRuntimeClasspath'.
   > Could not find com.thoughtworks.qdox:qdox:.
     Required by:
         project :spring-boot-project:spring-boot > project :spring-framework:spring-core-test

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 53s
47 actionable tasks: 22 executed, 21 from cache, 4 up-to-date

Publishing build scan...
https://ge.spring.io/s/jtz7qh6kklh4i

I'd hoped that moving away from the dependency management plugin would be enough to fix this, but it appears that's not the case. I think we'll have to chat with the Gradle team as I can't see why this wouldn't work now.

Comment From: snicoll

I still can't reproduce it @wilkinsona so perhaps something you and I can look at?

Comment From: wilkinsona

Stephane and I have reproduced this. The problem's specific to depending on a Spring Framework module that has a transitive dependency that isn't part of the including build. Spring Boot doesn't depend on QDox so its dependency on spring-core-test doesn't work. A similar failure can be seen with spring-webflux if the including build doesn't depend on Reactor. I am going to reach out to the Gradle team for some guidance.