evenisse 2004/08/28 14:22:15
Modified: cruisecontrol plugin.properties
cruisecontrol/src/plugin-resources cruisecontrol.jsl
cruisecontrol/xdocs changes.xml properties.xml
Log:
MPCRUISECONTROL-12. Add new properties to the maven cruisecontrol plugin. Ftp
publisher, Scp publisher.
Revision Changes Path
1.12 +29 -1 maven-plugins/cruisecontrol/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/maven-plugins/cruisecontrol/plugin.properties,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- plugin.properties 9 Aug 2004 15:47:57 -0000 1.11
+++ plugin.properties 28 Aug 2004 21:22:15 -0000 1.12
@@ -23,14 +23,42 @@
maven.cruisecontrol.logs.dir=${maven.build.dir}/cc-logs
maven.cruisecontrol.logs.mergedirectory=${maven.cruisecontrol.checkout.dir}/${module}/target/test-reports
maven.cruisecontrol.logs.merge=true
+maven.cruisecontrol.currentbuildstatus.filename=currentbuildstatus.txt
maven.cruisecontrol.goals=scm:update-project|clean test|site:deploy
+
maven.cruisecontrol.mail.host=localhost
maven.cruisecontrol.mail.defaultsuffix=DEFAULT_SUFFIX_NOT_SET
maven.cruisecontrol.mail.subjectprefix=[BUILD]
maven.cruisecontrol.mail.skipusers=false
maven.cruisecontrol.mail.reportsuccess=always
maven.cruisecontrol.mail.usemap=true
+
maven.cruisecontrol.template=${plugin.resources}/cruisecontrol.jsl
maven.cruisecontrol.trigger.projects=
maven.cruisecontrol.buildresults.site=${pom.url}/cruisecontrol
-maven.cruisecontrol.buildresults.url=${maven.cruisecontrol.buildresults.site}/buildresults/${pom.artifactId}
\ No newline at end of file
+maven.cruisecontrol.buildresults.url=${maven.cruisecontrol.buildresults.site}/buildresults/${pom.artifactId}
+
+#maven.cruisecontrol.ftp.targetHost=
+maven.cruisecontrol.ftp.targetUser=anonymous
+maven.cruisecontrol.ftp.targetPasswd=anonymous
+maven.cruisecontrol.ftp.targetPort=21
+maven.cruisecontrol.ftp.targetDir=.
+maven.cruisecontrol.ftp.targetSeparator=/
+maven.cruisecontrol.currentbuildstatusftppublisher=false
+#maven.cruisecontrol.currentbuildstatusftppublisher.file=
+#maven.cruisecontrol.currentbuildstatusftppublisher.destDir=
+maven.cruisecontrol.ftppublisher=false
+#maven.cruisecontrol.ftppublisher.destDir=
+maven.cruisecontrol.ftppublisher.srcDir=${maven.cruisecontrol.logs.dir}
+maven.cruisecontrol.ftppublisher.deleteArtifacts=no
+
+maven.cruisecontrol.scppublisher=false
+maven.cruisecontrol.scp.sourcedir=${maven.cruisecontrol.logs.dir}/${pom.artifactId}
+#maven.cruisecontrol.scp.targetuser=
+#maven.cruisecontrol.scp.targethost=
+maven.cruisecontrol.scp.targetlogdir=.
+maven.cruisecontrol.scp.targetstatusfiledir=.
+maven.cruisecontrol.scp.targetseparator=/
+maven.cruisecontrol.scp.ssh=ssh
+#maven.cruisecontrol.scp.file=
+maven.cruisecontrol.scp.statusfile=${maven.cruisecontrol.currentbuildstatus.filename}
\ No newline at end of file
1.13 +67 -2
maven-plugins/cruisecontrol/src/plugin-resources/cruisecontrol.jsl
Index: cruisecontrol.jsl
===================================================================
RCS file:
/home/cvs/maven-plugins/cruisecontrol/src/plugin-resources/cruisecontrol.jsl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- cruisecontrol.jsl 9 Aug 2004 15:47:57 -0000 1.12
+++ cruisecontrol.jsl 28 Aug 2004 21:22:15 -0000 1.13
@@ -39,7 +39,7 @@
<plugin name="svnbootstrapper"
classname="net.sourceforge.cruisecontrol.bootstrappers.SVNBootstrapper"/>
</j:if>
<bootstrappers>
- <currentbuildstatusbootstrapper
file="${maven.cruisecontrol.logs.dir}/currentbuildstatus.txt"/>
+ <currentbuildstatusbootstrapper
file="${maven.cruisecontrol.logs.dir}/${pom.artifactId}/${maven.cruisecontrol.currentbuildstatus.filename}"/>
</bootstrappers>
<modificationset>
<j:if test="${method == 'cvs'}">
@@ -92,7 +92,32 @@
</j:if>
</log>
<publishers>
- <currentbuildstatuspublisher
file="${maven.cruisecontrol.logs.dir}/currentbuildstatus.txt"/>
+ <currentbuildstatuspublisher
file="${maven.cruisecontrol.logs.dir}/${pom.artifactId}/${maven.cruisecontrol.currentbuildstatus.filename}"/>
+ <j:set var="ftpstatus"
value="${maven.cruisecontrol.currentbuildstatusftppublisher}"/>
+ <j:if test="${ftpstatus == 'true'}">
+ <currentbuildstatusftppublisher
+ targetHost="${maven.cruisecontrol.ftp.targetHost}"
+ targetUser="${maven.cruisecontrol.ftp.targetUser}"
+ targetPasswd="${maven.cruisecontrol.ftp.targetPasswd}"
+ targetPort="${maven.cruisecontrol.ftp.targetPort}"
+ targetDir="${maven.cruisecontrol.ftp.targetDir}"
+ targetSeparator="${maven.cruisecontrol.ftp.targetSeparator}"
+ file="${maven.cruisecontrol.currentbuildstatusftppublisher.file}"
+
destDir="${maven.cruisecontrol.currentbuildstatusftppublisher.destDir}"/>
+ </j:if>
+ <j:set var="ftppublisher" value="${maven.cruisecontrol.ftppublisher}"/>
+ <j:if test="${ftppublisher == 'true'}">
+ <ftppublisher
+ targetHost="${maven.cruisecontrol.ftp.targetHost}"
+ targetUser="${maven.cruisecontrol.ftp.targetUser}"
+ targetPasswd="${maven.cruisecontrol.ftp.targetPasswd}"
+ targetPort="${maven.cruisecontrol.ftp.targetPort}"
+ targetDir="${maven.cruisecontrol.ftp.targetDir}"
+ targetSeparator="${maven.cruisecontrol.ftp.targetSeparator}"
+ destDir="${maven.cruisecontrol.ftppublisher.destDir}"
+ srcDir="${maven.cruisecontrol.ftppublisher.srcDir}/${pom.artifactId}"
+
deleteArtifacts="${maven.cruisecontrol.ftppublisher.deleteArtifacts}"/>
+ </j:if>
<htmlemail
skipusers="${maven.cruisecontrol.mail.skipusers}"
reportsuccess="${maven.cruisecontrol.mail.reportsuccess}"
@@ -114,7 +139,47 @@
</j:if>
</j:if>
<failure address="${pom.build.nagEmailAddress}" />
+ <success address="${pom.build.nagEmailAddress}" />
</htmlemail>
+ <j:set var="scppublisher" value="${maven.cruisecontrol.scppublisher}"/>
+ <j:if test="${scppublisher == 'true'}">
+ <j:set var="scpfile" value="${maven.cruisecontrol.scp.file}"/>
+ <j:choose>
+ <j:when test="${!empty(scpfile)}">
+ <scp
+ sourcedir="${maven.cruisecontrol.scp.sourcedir}"
+ targetuser="${maven.cruisecontrol.scp.targetuser}"
+ targethost="${maven.cruisecontrol.scp.targethost}"
+ targetdir="${maven.cruisecontrol.scp.targetdir}"
+ file="${maven.cruisecontrol.scp.file}"
+ ssh="${maven.cruisecontrol.scp.ssh}"/>
+ <scp
+ sourcedir="${maven.cruisecontrol.scp.sourcedir}"
+ targetuser="${maven.cruisecontrol.scp.targetuser}"
+ targethost="${maven.cruisecontrol.scp.targethost}"
+ targetdir="${maven.cruisecontrol.scp.targetdir}"
+ file="${maven.cruisecontrol.scp.statusfile}"
+ ssh="${maven.cruisecontrol.scp.ssh}"/>
+ </j:when>
+ <j:otherwise>
+ <scp
+ sourcedir="${maven.cruisecontrol.scp.sourcedir}"
+ targetuser="${maven.cruisecontrol.scp.targetuser}"
+ targethost="${maven.cruisecontrol.scp.targethost}"
+ targetdir="${maven.cruisecontrol.scp.targetlogdir}"
+ targetseparator="${maven.cruisecontrol.scp.targetseparator}"
+ ssh="${maven.cruisecontrol.scp.ssh}"/>
+ <scp
+ sourcedir="${maven.cruisecontrol.scp.sourcedir}"
+ targetuser="${maven.cruisecontrol.scp.targetuser}"
+ targethost="${maven.cruisecontrol.scp.targethost}"
+ targetdir="${maven.cruisecontrol.scp.targetstatusfiledir}"
+ targetseparator="${maven.cruisecontrol.scp.targetseparator}"
+ file="${maven.cruisecontrol.scp.statusfile}"
+ ssh="${maven.cruisecontrol.scp.ssh}"/>
+ </j:otherwise>
+ </j:choose>
+ </j:if>
</publishers>
</project>
<jsl:applyTemplates select="./project" />
1.17 +1 -0 maven-plugins/cruisecontrol/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/cruisecontrol/xdocs/changes.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- changes.xml 14 Aug 2004 19:47:29 -0000 1.16
+++ changes.xml 28 Aug 2004 21:22:15 -0000 1.17
@@ -25,6 +25,7 @@
</properties>
<body>
<release version="1.6" date="in cvs">
+ <action dev="evenisse" type="add" issue="MPCRUISECONTROL-12"
due-to="Alexandre Vivien">Add new properties to the maven cruisecontrol plugin. Ftp
publisher, Scp publisher.</action>
</release>
<release version="1.5" date="2004-08-14">
<action dev="epugh" type="add" issue="MPCRUISECONTROL-11" due-to="Alexandre
Vivien">Add new properties to the maven cruisecontrol plugin.</action>
1.10 +263 -37 maven-plugins/cruisecontrol/xdocs/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/maven-plugins/cruisecontrol/xdocs/properties.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- properties.xml 9 Aug 2004 15:47:57 -0000 1.9
+++ properties.xml 28 Aug 2004 21:22:15 -0000 1.10
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
@@ -23,7 +23,7 @@
<title>Maven Cruise Control Plug-in Properties</title>
</properties>
<body>
- <section name="Maven Cruise Control Plug-in Settings">
+ <section name="Maven Cruise Control Plug-in Global Settings">
<table>
<tr>
<th>Property</th>
@@ -114,6 +114,14 @@
</td>
</tr>
<tr>
+ <td>maven.cruisecontrol.currentbuildstatus.filename</td>
+ <td>Yes</td>
+ <td>
+ <p>The filename to write the currentbuildstatus. Default value is
+ <code>currentbuildstatus.txt</code>.</p>
+ </td>
+ </tr>
+ <tr>
<td>maven.cruisecontrol.goals</td>
<td>Yes</td>
<td>
@@ -134,6 +142,66 @@
</td>
</tr>
<tr>
+ <td>maven.cruisecontrol.template</td>
+ <td>Yes</td>
+ <td>
+ <p>Template file to use in generating the cruisecontrol.xml file.</p>
+ <p>
+ <strong>NOTE: </strong>It may be more appropriate to set this in
build.properties
+ on the CruiseControl server since the value may differ from developer to
developer.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.trigger.projects</td>
+ <td>Yes</td>
+ <td>
+ <p>
+ A comma separated list of projects that should trigger
this project to build when
+ they are built. Allows you to build a project whose
dependencies
+ have changed.
+ </p>
+ <p>
+ <strong>NOTE: </strong>You may need to edit the config file to ensure that
dependent
+ project appear prior to the project. This is because CruiseControl builds
projects in
+ the order that appear in the config file. Failure to order the project
properly may
+ results in continuious rebuilding of project and/or avoidable build
failures.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.buildresults.site</td>
+ <td>Yes</td>
+ <td>
+ <p>
+ The root of the cruisecontrol site used in generating
the link to
+ CruiseControl. By default this is
+ <code>${pom.url}/cruisecontrol</code>. While not required,
+ typically you will need to set this.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.buildresults.url</td>
+ <td>Yes</td>
+ <td>
+ <p>
+ The url of the cruisecontrol site used in generating
the link to
+ CruiseControl. By default this is
+ <code>${maven.cruisecontrol.site}/buildresults/${pom.artifactId}</code>.
+ </p>
+ <p>
+ <strong>Note: </strong>Since the cruisecontrol report is not one of the
+ defaults reports, you must add the cruisecontrol report to see a
+ link to the Cruise Control Build Results under Project Reports.
+ </p>
+ </td>
+ </tr>
+ </table>
+ </section>
+ <section name="Maven Cruise Control Plug-in Mail Settings">
+ <table>
+ <tr>
<td>maven.cruisecontrol.mail.host</td>
<td>Yes</td>
<td>
@@ -184,64 +252,222 @@
<p>Default value is the domain name of the first email in
<code>${pom.build.nagEmailAddress}</code>.</p>
</td>
- </tr>
+ </tr>
+ </table>
+ </section>
+ <section name="Maven Cruise Control Plug-in FTP Publisher Settings">
+ <table>
<tr>
- <td>maven.cruisecontrol.template</td>
+ <td>maven.cruisecontrol.ftp.targetHost</td>
<td>Yes</td>
<td>
- <p>Template file to use in generating the cruisecontrol.xml file.</p>
+ <p>Host name of the FTP server.</p>
<p>
- <strong>NOTE: </strong>It may be more appropriate to set this in
build.properties
- on the CruiseControl server since the value may differ from developer to
developer.
- </p>
+ <strong>NOTE: </strong>This property doesn't have any default value, a
value is required if
+ <code>maven.cruisecontrol.currentbuildstatusftppublisher</code> property or
+ <code>maven.cruisecontrol.ftppublisher</code> property is set to
<code>true</code>.</p>
</td>
- </tr>
+ </tr>
<tr>
- <td>maven.cruisecontrol.trigger.projects</td>
+ <td>maven.cruisecontrol.ftp.targetUser</td>
+ <td>Yes</td>
+ <td>
+ <p>The user used for logging into the FTP site. Default value is
+ <code>anonymous</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.ftp.targetPasswd</td>
+ <td>Yes</td>
+ <td>
+ <p>The password used during FTP log in for the
<code>maven.cruisecontrol.ftp.targetUser</code>. Default value is
+ <code>anonymous</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.ftp.targetPort</td>
+ <td>Yes</td>
+ <td>
+ <p>Port number of the FTP server. Default value is
+ <code>21</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.ftp.targetDir</td>
+ <td>Yes</td>
+ <td>
+ <p>Base directory in the FTP server to put the files. Default value is
+ <code>.</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.ftp.targetSeparator</td>
+ <td>Yes</td>
+ <td>
+ <p>Directory separator character used by the FTP server. Default value
is
+ <code>/</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.currentbuildstatusftppublisher</td>
<td>Yes</td>
<td>
+ <p>Copies the file containing the current build status in a remote
directory onto the FTP server. Default value is
+ <code>false</code>.</p>
<p>
- A comma separated list of projects that should trigger
this project to build when
- they are built. Allows you to build a project whose
dependencies
- have changed.
- </p>
+ <strong>NOTE: </strong>To use this CruiseControl property you need to add
this line
+
<code>currentbuildstatusftppublisher=net.sourceforge.cruisecontrol.publishers.CurrentBuildStatusFTPPublisher</code>
+ in the default-plugins.properties file before building CruiseControl
+ (you can find it, in
INSTALL_DIR/main/src/net/sourceforge/cruisecontrol/).</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.currentbuildstatusftppublisher.file</td>
+ <td>Yes</td>
+ <td>
+ <p>The filename to write.</p>
<p>
- <strong>NOTE: </strong>You may need to edit the config file to ensure that
dependent
- project appear prior to the project. This is because CruiseControl builds
projects in
- the order that appear in the config file. Failure to order the project
properly may
- results in continuious rebuilding of project and/or avoidable build
failures.
- </p>
+ <strong>NOTE: </strong>This property doesn't have any default value, a
value is required if
+ <code>maven.cruisecontrol.currentbuildstatusftppublisher</code> property is
set to <code>true</code>.</p>
</td>
- </tr>
+ </tr>
<tr>
- <td>maven.cruisecontrol.buildresults.site</td>
+ <td>maven.cruisecontrol.currentbuildstatusftppublisher.destDir</td>
<td>Yes</td>
<td>
+ <p>The remote directory to write the file.</p>
<p>
- The root of the cruisecontrol site used in generating
the link to
- CruiseControl. By default this is
- <code>${pom.url}/cruisecontrol</code>. While not required,
- typically you will need to set this.
- </p>
+ <strong>NOTE: </strong>This property doesn't have any default value, a
value is required if
+ <code>maven.cruisecontrol.currentbuildstatusftppublisher</code> property is
set to <code>true</code>.</p>
</td>
- </tr>
+ </tr>
<tr>
- <td>maven.cruisecontrol.buildresults.url</td>
+ <td>maven.cruisecontrol.ftppublisher</td>
<td>Yes</td>
<td>
+ <p>Copies the XML log file from the build onto the FTP server. Default
value is
+ <code>false</code>.</p>
<p>
- The url of the cruisecontrol site used in generating
the link to
- CruiseControl. By default this is
- <code>${maven.cruisecontrol.site}/buildresults/${pom.artifactId}</code>.
- </p>
+ <strong>NOTE: </strong>To use this CruiseControl property you need to add
this line
+
<code>ftppublisher=net.sourceforge.cruisecontrol.publishers.FTPPublisher</code>
+ in the default-plugins.properties file before building CruiseControl
+ (you can find it, in
INSTALL_DIR/main/src/net/sourceforge/cruisecontrol/).</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.ftppublisher.destDir</td>
+ <td>Yes</td>
+ <td>
+ <p>The remote directory to publish the files.</p>
<p>
- <strong>Note: </strong>Since the cruisecontrol report is not one of the
- defaults reports, you must add the cruisecontrol report to see a
- link to the Cruise Control Build Results under Project Reports.
- </p>
+ <strong>NOTE: </strong>This property doesn't have any default value, a
value is required if
+ <code>maven.cruisecontrol.ftppublisher</code> property is set to
<code>true</code>.</p>
</td>
- </tr>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.ftppublisher.srcDir</td>
+ <td>Yes</td>
+ <td>
+ <p>To publish the XML log file, this must be the same as
<code>maven.cruisecontrol.logs.dir</code>. Default value is
+ <code>${maven.cruisecontrol.logs.dir}</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.ftppublisher.deleteArtifacts</td>
+ <td>Yes</td>
+ <td>
+ <p>If <code>yes</code>, then all files successfully sent to the FTP
server will be deleted locally. Default value is
+ <code>no</code>.</p>
+ </td>
+ </tr>
</table>
+ </section>
+ <section name="Maven Cruise Control Plug-in SCP Publisher Settings">
+ <table>
+ <tr>
+ <td>maven.cruisecontrol.scppublisher</td>
+ <td>Yes</td>
+ <td>
+ <p>Copies the XML log file from the build with a SCP command onto a
remote host. Default value is
+ <code>false</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.scp.sourcedir</td>
+ <td>Yes</td>
+ <td>
+ <p>The directory to copy from. Default value is
+ <code>${maven.cruisecontrol.logs.dir}</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.scp.targetuser</td>
+ <td>Yes</td>
+ <td>
+ <p>Log in to the target machine as this user.</p>
+ <p>
+ <strong>NOTE: </strong>This property doesn't have any default value, a
value is required if
+ <code>maven.cruisecontrol.scppublisher</code> property is set to
<code>true</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.scp.targethost</td>
+ <td>Yes</td>
+ <td>
+ <p>SCP to this machine.</p>
+ <p>
+ <strong>NOTE: </strong>This property doesn't have any default value, a
value is required if
+ <code>maven.cruisecontrol.scppublisher</code> property is set to
<code>true</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.scp.targetlogdir</td>
+ <td>Yes</td>
+ <td>
+ <p>The directory to copy the log files. Default value is
+ <code>.</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.scp.targetstatusfiledir</td>
+ <td>Yes</td>
+ <td>
+ <p>The directory to copy the currentstatusfile. Default value is
+ <code>.</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.scp.targetseparator</td>
+ <td>Yes</td>
+ <td>
+ <p>The file separator on the target machine. Default value is
+ <code>/</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.scp.ssh</td>
+ <td>Yes</td>
+ <td>
+ <p>The ssh application. Default value is
+ <code>ssh</code>.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.scp.file</td>
+ <td>Yes</td>
+ <td>
+ <p>The filename to copy. Default value is the current log file.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>maven.cruisecontrol.scp.statusfile</td>
+ <td>Yes</td>
+ <td>
+ <p>The statusfilename to copy. Default value is
+ <code>${maven.cruisecontrol.currentbuildstatus.filename}</code>.</p>
+ </td>
+ </tr>
+ </table>
</section>
</body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]