Plugins classpath?
"Nathan Russell" <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <6E80CFEBE068F44BAD79EB89CA1FD5910150EB29@edgemail01.uk.edgeipk.com> |
I have setup CC v2.8.2, and am using it to build a couple of projects.
The projects that I am building are based on my employer's proprietory
software; and I have written a CC 'modification' plugin which interfaces
with our proprietory source control and detects code changes. The plugin
that I wrote uses objects and methods from our software supplied to me
in a couple of jar files - Acquire.jar and XMLVC.jar. I can specify the
location of the jars on the classpath within the main cruisecontrol.sh
and all works fine .... however ....
As a small software company, our software is enhanced and developed
quite frequently; and the classes and methods within the 2 above jars
change (the signatures are the same; its the internal implementation
that gets changed). My two projects are based on different versions of
our software, so technically speaking my plugin should use different
versions of Aquire.jar and XMLVC.jar; but I cant work out how to do
this.
IE. What would be ideal would be to have a config.xml like this:
<cruisecontrol>
<project name="projectA">
<!-- a 4.2 project -->
<plugin name="checkEnterprise"
classname="com.myCompany.cruisecontrol.EnterpriseModifications"
classpath="/usr/share/myCompany/4.2/Acquire.jar;/usr/share/myCompany/4.2
/XMLVC.jar" />
<modificationset quietperiod="120">
<checkEnterprise
dir="/CruiseControlProjects/projects/projectA" host="server03"
port="9020" user="userN" password="passW" projectName="projectA"
label="Latest Version" projectStageName="DEV" />
</modificationset>
</project>
<project name="projectB">
<!-- a 4.5 project -->
<plugin name="checkEnterprise"
classname="com.myCompany.cruisecontrol.EnterpriseModifications"
classpath="/usr/share/myCompany/4.5/Acquire.jar;/usr/share/myCompany/4.5
/XMLVC.jar" />
<modificationset quietperiod="120">
<checkEnterprise
dir="/CruiseControlProjects/projects/projectB" host="server03"
port="9020" user="userN" password="passW" projectName="projectB"
label="Latest Version" projectStageName="DEV" />
</modificationset>
</project>
</cruisecontrol>
But there is no classpath attribute documented for the plugin element.
What I was thinking about (but don't know if its possible) would be to
specify the classpath as an attribute of the checkEnterprise element and
pick it up with a getClasspath method:
<checkEnterprise dir="/CruiseControlProjects/projects/projectB"
host="server03" port="9020" user="userN" password="passW"
projectName="projectB" label="Latest Version" projectStageName="DEV"
classpath="/usr/share/myCompany/4.5/Acquire.jar;/usr/share/myCompany/4.5
/XMLVC.jar" />
If I did this, is it possible to set the classpath dynamically in code
(I guess this is a java question rather than a CC question)
Any ideas? Am I barking up the wrong tree? Is there a better way of
doing what I am after?
Many thanks
Nathan
------------------------------------------------------------------------------