Writing a plugin

Mark Boon <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
I'd be extremely interested in writing a CruiseControl plugin. But unfortunately the information available on the web-site is rather meager. ( http://cruisecontrol.sourceforge.net/main/plugins.html#defaultregistry )

As a first attempt I'm just trying to make something print something on the screen when a build finishes. But even that simple task I didn't manage, simply because CC doesn't let me insert my own tags. For example I have the following config.xml:

<cruisecontrol>
    <project name="connectfour">

	<plugin name="CCReporter" classname="com.bps.cc.CCReporter"/>

        <listeners>
            <currentbuildstatuslistener file="logs/${project.name}/status.txt"/>
        </listeners>

        <bootstrappers>
            <antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml" target="clean" />
        </bootstrappers>

        <modificationset quietperiod="30">
            <!-- touch any file in connectfour project to trigger a build -->
            <filesystem folder="projects/${project.name}"/>
        </modificationset>

        <schedule interval="300">
            <ant anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml"/>
        </schedule>

        <log>
            <merge dir="projects/${project.name}/target/test-results"/>
        </log>

        <publishers>
		<CCReporter/>
            <onsuccess>
                <artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/target/${project.name}.jar"/>
            </onsuccess>
        </publishers>

    </project>
</cruisecontrol>

and when I start CC it says:
net.sourceforge.cruisecontrol.CruiseControlException: Nested element: 'CCReporter' is not supported for the <publishers> tag.

Same if I stick it in the <onsuccess> element.

So I'm confused, how can one make plugins if the config XML is restricted to a predefined set of tags?

And if it is predefined, would there be some sort of XSD file that I could modify to add it in? Although that would be ugly, that would at least make me get around it.

Mark

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay

_______________________________________________
Cruisecontrol-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.