-
Bug
-
Resolution: Unresolved
-
Major
-
Windows 7, Jenkins 1.523, Groovy Postbuild: 1.8, SQL Server 2008, JDBC 4.0
Jenkins: 1:523, PostBuild: 1.8
I have a Groovy script . . . that will eventually be a post build script . . . for now the script runs on its own and connects to a Database, but with this CLASSPATH set:
SET CLASSPATH=C:\Users\fmerrow\Downloads\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\sqljdbc4.jar
However, when I try to get the working script to run as a post build . . . I cannot find the class in that file.
I've tried to specify as Directory using "Additional groovy classpath" and when that didn't work as full path to the Jar file. I also wondered if spaces would be an issue . . . Quoting gave odd results (pretended C:\Program Files(x85)\Jenkins to the path) so I moved it into a directory with no spaces (again tried both file and directory) . . . I cannot seem to get it to find the class in this jar file.
Works fine "in the clear" with CLASSPATH set, but I cannot get it to work inside the Jenkins JVM.
Frank
[JENKINS-18989] Cannot get Plugin to honor Java Jar added via "Additional groovy classpath"
Labels | Original: classpath, groovy plugin, | New: classpath groovy |
I'm having a similar struggle. I tried to add my dependency JAR files via the "Additional groovy classpath" mechanism but its not working. I'm stuck doing horrible things like
Other unsuccessful attempts include
The code involved with handling the "Additional groovy classpath" seems like it should support adding dependency JARs... https://github.com/jenkinsci/groovy-postbuild-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/groovypostbuild/GroovyPostbuildRecorder.java
@Frank Please let me know if you find a better workaround.