This will be a “bug report from hell”, unfortunately.
Sometimes (i.e. this is not reproducible and it’s also quite rare) our Jenkins CI server produces ClassNotFound exceptions after a dependency has been updated.
This happened, for example, while updating
org.gebish:geb-spock:0.12.2. The class
geb.spock.GebSpec wasn’t found anymore.
It also happened with
hibernate-validator-4.2.0.Final without changing the dependency.
error: package javax.validation does not exist
So far, this only happened on our build server.
The switches for Gradle on Jenkins are the following:
--refresh-dependencies --no-search-upward --no-daemon --stacktrace.
This state is persistent. If Gradle gets into this strange state, it will stay in that state for future builds. Unfortunately, I have no idea how to reproduce that state.
gradle clean does not fix the problem - but manually deleting
I’m not sure if this already happened with Gradle 2.5 but it definitely happened with both Gradle 2.6 and 2.7-rc-1.
I know that this isn’t the most impressive bug report but I wanted to at least raise a flag and mention it. (A fishy heisencache is giving me the creeps.)
We are using an in-house Nexus repository as our dependency cache. I don’t think this has an impact since local builds have always been fine so far but I wanted to mention it anyway due to the general voodoo aspect of this issue.