Hudson on Weblogic
Hudson is a brilliant continuous integration tool, easier to configure than Cruise Control... but how to deploy it on Weblogic? When I tried it, it complained that the Ant version bundled with Weblogic 10g was incompatible with Hudson's.
Initially I tried giving the hudson.war a weblogic.xml file containing:
but it didn't seem to work for me, so I went with the suggestion in this useful post, which suggests wrapping the hudson.war in an EAR, and deploying that, with the classloader configured to prefer application packages for the org.apache.* classes.
So that got me up and running (merci Maxence!), but when I started trying to run builds for projects using Maven, I hit another problem. Under Weblogic, calling out to the bundled Maven agent seems to have a bug. See this post, which looks similar to my problem as it cannot access the Maven agent JAR using the zip: protocol - there are other posts knocking around for similar problems in JBoss and/or Tomcat, but no fix available yet.
Unable to get the native Hudson Maven integration working properly, I resorted to invoking the Maven command line interface from Hudson: create a script which cds to the folder containing the Maven project (as Hudson by default runs scripts from its workspace folder) and then does "CALL mvn clean install" to run your Maven installation. Then, from the Hudson web console, set your Hudson job up to run your script (again, relative to the workspace folder).
Initially I tried giving the hudson.war a weblogic.xml file containing:
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
but it didn't seem to work for me, so I went with the suggestion in this useful post, which suggests wrapping the hudson.war in an EAR, and deploying that, with the classloader configured to prefer application packages for the org.apache.* classes.
So that got me up and running (merci Maxence!), but when I started trying to run builds for projects using Maven, I hit another problem. Under Weblogic, calling out to the bundled Maven agent seems to have a bug. See this post, which looks similar to my problem as it cannot access the Maven agent JAR using the zip: protocol - there are other posts knocking around for similar problems in JBoss and/or Tomcat, but no fix available yet.
Unable to get the native Hudson Maven integration working properly, I resorted to invoking the Maven command line interface from Hudson: create a script which cds to the folder containing the Maven project (as Hudson by default runs scripts from its workspace folder) and then does "CALL mvn clean install" to run your Maven installation. Then, from the Hudson web console, set your Hudson job up to run your script (again, relative to the workspace folder).

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
Links to this post:
Create a Link
<< Home