dion 2002/10/26 08:52:33
Modified: src/plugins-build/site plugin.properties plugin.jelly
project.xml
src/plugins-build/site/xdocs properties.xml navigation.xml
Added: src/plugins-build/site/xdocs goals.xml changes.xml
Log:
- Added ability to deploy via file system thanks to Alef Arendsen
- Added more documentation
Revision Changes Path
1.2 +5 -0 jakarta-turbine-maven/src/plugins-build/site/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/site/plugin.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plugin.properties 14 Jul 2002 19:09:30 -0000 1.1
+++ plugin.properties 26 Oct 2002 15:52:33 -0000 1.2
@@ -14,4 +14,9 @@
maven.final.name = ${pom.id}-${pom.currentVersion}
maven.final.dir = ${basedir}/${maven.final.name}
+# set maven.site.deploy.method to 'fs' if you want to COPY the site
+# instead of SSH'ing it to the webserver (pom.siteDirectory is used
+# to copy the site to
+maven.site.deploy.method=ssh
+
maven.username=USERNAME_NOT_SET
1.5 +49 -10 jakarta-turbine-maven/src/plugins-build/site/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/site/plugin.jelly,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- plugin.jelly 14 Sep 2002 14:23:46 -0000 1.4
+++ plugin.jelly 26 Oct 2002 15:52:33 -0000 1.5
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<project
+<project
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:m="maven">
@@ -13,10 +13,10 @@
description="Generate the web site"
prereqs="site:generate"/>
- <goal
+ <goal
name="site:generate"
description="Generate the web site">
-
+
<attainGoal name="jdepend"/>
<attainGoal name="checkstyle"/>
<attainGoal name="changelog"/>
@@ -26,7 +26,7 @@
<attainGoal name="junit-report"/>
<attainGoal name="tasklist"/>
<attainGoal name="xdoc"/>
-
+
</goal>
<!-- ================================================================== -->
@@ -36,18 +36,38 @@
<goal
name="site:deploy">
- <m:user-check user="${maven.username}"/>
-
<!--
-
+
Generate the site documentation if it has not already been generated.
We need some markers or timestamps for this so we don't repeat work
if it's not necessary.
-
+
-->
<attainGoal name="site:generate"/>
+ <!--
+
+ Deploy the site using the maven.site.deploy.method property (right
+ now possible variants are 'fs' and 'ssh')
+
+ -->
+
+ <attainGoal name="site:${maven.site.deploy.method}deploy"/>
+
+
+ </goal>
+
+ <!-- ================================================================== -->
+ <!-- S I T E S S H D E P L O Y -->
+ <!-- Deploys the site using SSH -->
+ <!-- ================================================================== -->
+
+ <goal
+ name="site:sshdeploy">
+
+ <m:user-check user="${maven.username}"/>
+
<echo>
siteAddress = ${pom.siteAddress}
siteDirectory = ${pom.siteDirectory}
@@ -59,7 +79,7 @@
<tar tarfile="${maven.build.dir}/${maven.final.name}-site.tar"
basedir="${maven.docs.dest}"/>
<gzip zipfile="${maven.build.dir}/${maven.final.name}-site.tar.gz"
src="${maven.build.dir}/${maven.final.name}-site.tar"/>
<delete file="${maven.build.dir}/${maven.final.name}-site.tar"/>
-
+
<!-- Make sure the destination directory exists before trying to copy -->
<exec dir="." executable="${maven.ssh.executable}">
<arg line="${pom.siteAddress} -l ${maven.username} 'mkdir -p
${maven.homepage}'"/>
@@ -75,7 +95,26 @@
</exec>
<delete file="${maven.build.dir}/${maven.final.name}-site.tar.gz"/>
-
+
+ </goal>
+
+ <goal
+ name="site:fsdeploy">
+
+ <echo>
+ siteAddress = ${pom.siteAddress}
+ siteDirectory = ${pom.siteDirectory}
+ </echo>
+
+ <!-- copy the site to the directory specified in the project.xml file -->
+
+ <copy todir="${pom.siteDirectory}">
+ <fileset dir="${maven.docs.dest}">
+ <include name="**/*.*"/>
+ </fileset>
+ </copy>
+
</goal>
+
</project>
1.10 +1 -1 jakarta-turbine-maven/src/plugins-build/site/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/site/project.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- project.xml 16 Sep 2002 08:19:09 -0000 1.9
+++ project.xml 26 Oct 2002 15:52:33 -0000 1.10
@@ -4,7 +4,7 @@
<pomVersion>3</pomVersion>
<id>maven-site-plugin</id>
<name>Maven Site Plugin</name>
- <currentVersion>1.0</currentVersion>
+ <currentVersion>1.1-SNAPSHOT</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>http://jakarta.apache.org/</url>
1.3 +12 -0
jakarta-turbine-maven/src/plugins-build/site/xdocs/properties.xml
Index: properties.xml
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/plugins-build/site/xdocs/properties.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- properties.xml 15 Aug 2002 06:30:36 -0000 1.2
+++ properties.xml 26 Oct 2002 15:52:33 -0000 1.3
@@ -4,6 +4,7 @@
<properties>
<title>Site Properties</title>
<author email="[EMAIL PROTECTED]">St�phane MOR</author>
+ <author email="[EMAIL PROTECTED]">Alef Arendsen</author>
</properties>
<body>
@@ -28,6 +29,17 @@
shell executable to use (SSH). This is used by the "site:deploy" goal.
The default value is <code>ssh</code> (i.e. an executable
named <code>ssh</code> must be in your path).
+ </td>
+ </tr>
+ <tr>
+ <td>maven.site.deploy.method</td>
+ <td>Yes</td>
+ <td>
+ Specifies the method to use when deploying the site. Possible values
are:
+ <code>fs</code> and <code>ssh</code>. The ssh method is the good old
+ method which has always been used within Maven. When you specify
+ <code>fs</code> the site will be deployed on a local file system.
+ The <code>siteDirectory</code> property will be used to copy the site
to.
</td>
</tr>
</table>
1.2 +1 -0
jakarta-turbine-maven/src/plugins-build/site/xdocs/navigation.xml
Index: navigation.xml
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/plugins-build/site/xdocs/navigation.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- navigation.xml 9 Sep 2002 05:27:55 -0000 1.1
+++ navigation.xml 26 Oct 2002 15:52:33 -0000 1.2
@@ -9,6 +9,7 @@
</links>
<menu name="Overview">
<item name="Properties" href="/properties.html" />
+ <item name="Goals" href="/goals.html" />
</menu>
</body>
</project>
1.1 jakarta-turbine-maven/src/plugins-build/site/xdocs/goals.xml
Index: goals.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Maven Site Plug-in Goals</title>
<author email="[EMAIL PROTECTED]">dIon Gillard</author>
</properties>
<body>
<section name="Goals">
<table>
<tr><th>Goal</th><th>Description</th></tr>
<tr>
<td>site</td>
<td>
This is the default goal of the plugin and simply attains
the <code>site:generate</code> goal.
</td>
</tr>
<tr>
<td>site:generate</td>
<td>
Generates a Maven documentation site by attaining the following
goals
<ul>
<li>jdepend</li>
<li>checkstyle</li>
<li>changelog</li>
<li>activity</li>
<li>javadoc</li>
<li>jxr</li>
<li>junit-report</li>
<li>tasklist</li>
<li>xdoc</li>
</ul>
See the respective plugins for more information on those goals
</td>
</tr>
<tr>
<td>site:deploy</td>
<td>
Generates the site using the <code>site:generate</code>, and then
deploys the site using either <code>ssh</code> or copying via the
file system, depending on the <code>maven.site.deploy.method</code>
property.
</td>
</tr>
<tr>
<td>site:sshdeploy</td>
<td>
Deploys the site by <code>tar.gz</code>'ing the docs,
<code>scp</code>'ing them to the <code>pom.siteAddress</code>
and then unpacking them into the <code>pom.siteDirectory</code>
</td>
</tr>
<tr>
<td>site:fsdeploy</td>
<td>
Deploys the site by coping the docs to the <code>pom.siteDirectory</code>
</td>
</tr>
</table>
</section>
</body>
</document>
1.1 jakarta-turbine-maven/src/plugins-build/site/xdocs/changes.xml
Index: changes.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Changes</title>
<author email="[EMAIL PROTECTED]">dIon Gillard</author>
</properties>
<body>
<release version="1.1" date="in CVS">
<action dev="dion" type="add" due-to="Alef Arendsen">
Added ability to deploy via filesystem
</action>
</release>
<release version="1.0" date="2002-08-04">
<action dev="jvanzyl" type="add">
Original release for Maven 1.0-beta6
</action>
</release>
</body>
</document>
--
To unsubscribe, e-mail: <mailto:turbine-maven-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-dev-help@;jakarta.apache.org>