Problem with Gradle Milestone 5?
My gradle build works fine running locally as well as run on a build agent manually (copied /work/ - directory as is and run via Gradle wrapper). But with TC the classpath configured for buildscript() (doing some XSLT transformations with Saxon lib) does not work ("cannot resolve symbol net.sf.saxon. ..."), although it prints the classpath as resolved correctly: buildscript.configurations.classpath.each { println it } Is there something w/r to Teamcity triggering Gradle build (init.gradle related?) that would make it fail (it worked with Milestone 3)?
Please sign in to leave a comment.
Hello Yann,
TeamCity does add its own init.gradle to the build process, but it does not manipulate your buildscripts' classpath in any way.
How exactly are you adding a dependency on Saxon lib to your buildscript? Would you mind attaching a fragment of the buildscript?
What version of TeamCity do you use?
Hm, well I rolled back to Milestone 3 and recreated Gradle wrapper - then it works again in TC. So definitely something going wrong there..
Here's the relevant part of my master build.gradle:
buildscript {
repositories {
mavenCentral()
mavenRepo urls: [ 'http://maven2.slonopotamus.org' // Saxon ] }
dependencies {
classpath 'org.codehaus.gpars:gpars:0.12'
classpath group: 'net.sf.saxon', name: 'saxon', version: '8.9.0.3'
}
}
Saxon-classes are then later used by subproject build scripts.
I'm using 7.0 EAP (build 20334).
Thanks,
Yann
Hello Yann,
Unfortunately, I still can't reproduce this issue. I need more information about you multi-project structure and the way you are using Saxon.
How is your multi-project build organized? Can you post a full build log? In case you feel this is a confidentional information, please, send your logs to teamcity-feedback@jetbrains.com
Further debugging (thanks to Nikita) revelead that the underlying error seems to be located in Gradle running under SYSTEM account. http://forums.gradle.org/gradle/topics/error_running_build_with_milestone_5_using_system_account