I spent a day in classpath purgatory tracking down a runtime error that I finally have a handle on. I’m not necessarily looking for an answer, because at this point I don’t think it really matters. But I wanted to air this in case I’m missing something important.
I’m in the process of migrating from Gradle 1.3 to Gradle 1.10. My project has about 270 jars on the classpath (ugh).
When I examine the runtime classpath in Gradle 1.3, this particular ordering of cglib and cglib-nodep obtains
/cglib/cglib-nodep/3.1/jar/aa83efbd1aedc4f26bdf00e7ea78191483f2c9b3/cglib-nodep-3.1.jar
/cglib/cglib/2.1_3/jar/d3851e366b9fe8b7d8215de0f9eb980b359d8de0/cglib-2.1_3.jar
and when I examine the runtime classpath with Gradle 1.10, this ordering obtains
/cglib/cglib/2.1_3/d3851e366b9fe8b7d8215de0f9eb980b359d8de0/cglib-2.1_3.jar
/cglib/cglib-nodep/3.1/aa83efbd1aedc4f26bdf00e7ea78191483f2c9b3/cglib-nodep-3.1.jar
You can see that they are flipped with respect to one another.
As an aside, the Gradle 1.10 ordering breaks my app at runtime, where cglib 2.1_3 wants to load a version of an ASM class that is not on the classpath.
I’m not sure what the right question to ask is, but this difference in ordering can be significant and I wanted to point it out should someone else see something in it.