The error should be fixed now by adding explicit taskdefs
instead of changing the classpath of the classloader which
did load org.apache.tools.ant.Project.
This classloader is owned by Gradle and is probably a parent
of the one which is used for TarBuildCacheEntryPacker
.
See https://github.com/gradle/gradle/issues/11914
Comment From: pivotal-issuemaster
@wolfs Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-issuemaster
@wolfs Thank you for signing the Contributor License Agreement!
Comment From: wilkinsona
Thank you, @wolfs. Unfortunately, we really need a way of adding to Ant's classpath without any additional taskdefs. A user's of Spring Boot's Ant integration shouldn't have to define any tasks and the smoke test is intended to verify that is the case. Defining tasks up front means that the smoke test is no longer covering everything that it is intended to cover. We really need an equivalent of Maven's AntRun plugin where dependencies can be added to the classpath and Ant picks them up as it would do when being invoked "normally".
It may be that what's proposed here is better than the occasional loader constraint violations and it's worth merging it, but something that does nothing more than adding to Ant's classpath would be preferable. I'd like to be certain that such an option does not exist first.
Comment From: wilkinsona
Superseded by https://github.com/spring-projects/spring-boot/issues/19839.