Re: Plugins classpath?
Jeffrey Fredrick <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Nathan, different versions of Aquire.jar and XMLVC.jar As you've discovered CC doesn't have the ability to specify the classpath per plugin. is it possible to set the classpath dynamically in code Yes it is. You'd need to modify the code where plugins are instantiated to be aware of the classpath attribute but it should be possible. Of course you might find it easier to just run two instances of CC. Jtf On Tue, Jun 30, 2009 at 1:21 AM, Nathan Russell <[email protected]>wrote: > 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 > > -- CITCON Continuous Integration and Testing Conference http://www.citconf.com/ ------------------------------------------------------------------------------ _______________________________________________ Cruisecontrol-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user