I'm new to Jenkins, and I'm trying to get a Netbeans created web project to build. Here is what I did:
First, I set up all the libraries the project uses under Global Properties Environment Variables:
LIB_RICHFACES_CLASSPATH
/var/lib/jenkins/lib/Hudson/libs.Richfaces.classpath/darkX-3.3.3.Final.jar;<a bunch of other jars>
LIB_XSTREAM_1_3_CLASSPATH
/var/lib/jenkins/lib/Hudson/libs.xstream-1.3.classpath/cglib-nodep-2.1_3.jar;<a bunch of other jars>
LIB_APACHE_COMMONS_CLASSPATH
/var/lib/jenkins/lib/Hudson/libs.ApacheCommons.classpath/commons-beanutils-1.7.0.jar;<a bunch of other jars>
LIB_ITEXT_CLASSPATH
/var/lib/jenkins/lib/Hudson/libs.iText.classpath/iText-2.1.3.jar;<a bunch of other jars>
LIB_EL_CLASSPATH
/var/lib/jenkins/lib/Hudson/libs.EL.classpath/el-impl-2.2.0-SNAPSHOT.jar
LIB_JAVA_MAIL_CLASSPATH
/var/lib/jenkins/lib/Hudson/libs.JavaMail.classpath/dsn.jar;<a bunch of other jars>
Then, in the Job I configured the Ant properties like such (the reference.* items where copied from other Jobs using the artifact copy plugin):
no.dependencies=true
reference.MyLib2.jar=lib/MyLib2.jar
reference.BaseLib.jar=lib/BaseLib.jar
libs.Richfaces.classpath=$LIB_RICHFACES_CLASSPATH
libs.xstream-1.3.classpath=$LIB_XSTREAM_1_3_CLASSPATH
libs.iText.classpath=$LIB_ITEXT_CLASSPATH
libs.ApacheCommons.classpath=$LIB_APACHE_COMMONS_CLASSPATH
libs.EL.classpath=$LIB_EL_CLASSPATH
libs.JavaMail.classpath=LIB_JAVA_MAIL_CLASSPATH
Running the build for this Job fails with the following:
BUILD FAILED
/var/lib/jenkins/home/jobs/MyWebProject/workspace/nbproject/build-impl.xml:460: The libs.CopyLibs.classpath property is not set up.
This property must point to
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
of NetBeans IDE installation and is usually located at
<netbeans_installation>/java<version>/ant/extra folder.
Either open the project in the IDE and make sure CopyLibs library
exists or setup the property manually. For example like this:
ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
First, has anyone gotten Netbeans web projects to build with Jenkins? Do I have to copy IDE libraries to the Jenkins machine and configure a classpath variable like above? There has to be a better way.
Second, I'm sure I should be using something like Ivy to resolve the library dependencies. Does anyone link to an article on how to actually do this? I don't know much about Ivy, Maven, etc. Right not I register all libraries manually.
Thanks!