You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by pl...@apache.org on 2003/04/24 20:43:55 UTC
cvs commit: maven/src/plugins-build/webserver/src/plugin-resources apache-2.x.jelly
plynch 2003/04/24 11:43:54
Modified: src/plugins-build/webserver/src/plugin-resources
apache-2.x.jelly
Log:
o cleaning up reinstall and install goals into a dyna tag
The reason is the only difference is on a reinstall we want to force the copy of conf files, where an install doesn't force.
o general cleanup
o now implements restart and reinstall goals correctly
Revision Changes Path
1.6 +72 -37 maven/src/plugins-build/webserver/src/plugin-resources/apache-2.x.jelly
Index: apache-2.x.jelly
===================================================================
RCS file: /home/cvs/maven/src/plugins-build/webserver/src/plugin-resources/apache-2.x.jelly,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- apache-2.x.jelly 27 Mar 2003 17:31:00 -0000 1.5
+++ apache-2.x.jelly 24 Apr 2003 18:43:54 -0000 1.6
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
-<project xmlns:j="jelly:core" xmlns:log="jelly:log" xmlns:ant="jelly:ant">
+<project xmlns:j="jelly:core" xmlns:log="jelly:log" xmlns:ant="jelly:ant"
+ xmlns:apache2x="http://www.maven.org/plugin/webserver/apache2x"
+ xmlns:define="jelly:define" >
<goal name="webserver:apache-2.x-reqs"
description="Intialize resources for apache processing">
@@ -27,51 +29,75 @@
value="${context.getVariable('user.name')}-maven-webserver-${pom.getId()}" />
</j:if>
- </goal>
+ <define:taglib uri="http://www.maven.org/plugin/webserver/apache2x">
- <goal name="webserver:install-apache-2.x" prereqs="webserver:apache-2.x-reqs"
- description="Install Apache 2.x">
+ <!-- accept the force property with a value of true or false -->
+ <define:tag name="install">
- <!-- Create common directories and copy configuration files -->
- <ant:mkdir dir="${maven.webserver.dir}/logs"/>
- <ant:mkdir dir="${maven.webserver.dir}/conf"/>
- <ant:mkdir dir="${maven.webserver.root}"/>
-
- <!-- copy any user configuration files w/ filtering by forcing copy -->
- <!-- expecting at least a httpd.conf -->
- <ant:copy todir="${maven.webserver.dir}" overwrite="true">
- <ant:fileset dir="${maven.webserver.conf.dir}" />
- <ant:filterset refid="maven.webserver.filterset.default" />
- </ant:copy>
+ <j:if test="${force == 'false'}">
+ <!-- Create common directories and copy configuration files -->
+ <ant:mkdir dir="${maven.webserver.dir}/logs"/>
+ <ant:mkdir dir="${maven.webserver.dir}/conf"/>
+ <ant:mkdir dir="${maven.webserver.root}"/>
+ </j:if>
- <j:if test="${systemScope['os.name'].startsWith('Windows')}">
+ <!-- copy any user configuration files w/ filtering by forcing copy -->
+ <!-- if reinstall -->
+ <ant:copy todir="${maven.webserver.dir}" overwrite="${force}">
+ <ant:fileset dir="${maven.webserver.conf.dir}" />
+ <ant:filterset refid="maven.webserver.filterset.default" />
+ </ant:copy>
- <!-- try to install the service for this project on Windows NT/2000/XP -->
- <!-- Windows 98/ME don't use a service -->
- <ant:exec executable="${maven.webserver.home}\bin\apache.exe"
- os="Windows NT,Windows 2000,Windows XP">
- <ant:arg value="-d" />
- <ant:arg line="${maven.webserver.root}" />
- <ant:arg value="-f" />
- <ant:arg line="${maven.webserver.dir}\conf\httpd.conf" />
- <ant:arg line="-k install" />
- <ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
- </ant:exec>
+ <j:if test="${systemScope['os.name'].startsWith('Windows') and force == 'false'}">
- </j:if>
+ <!-- try to install the service for this project on Windows NT/2000/XP -->
+ <!-- Windows 98/ME don't use a service -->
+ <ant:exec executable="${maven.webserver.home}\bin\apache.exe"
+ os="Windows NT,Windows 2000,Windows XP">
+ <ant:arg value="-d" />
+ <ant:arg line="${maven.webserver.root}" />
+ <ant:arg value="-f" />
+ <ant:arg line="${maven.webserver.dir}\conf\httpd.conf" />
+ <ant:arg line="-k install" />
+ <ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
+ </ant:exec>
+
+ </j:if>
- <!-- TBD - should I install a helper script for each install??? -->
- <!-- <ant:copy file="${plugin.dir}/apache-2.x.bat"
- tofile="${maven.webserver.dir}/apache.bat" overwrite="true">
- <ant:filterset refid="maven.webserver.filterset.default" />
- <ant:filterset refid="maven.webserver.filterset" />
- </ant:copy> -->
+ <!-- TBD - should I install a helper script for each install??? -->
+ <!-- <ant:copy file="${plugin.dir}/apache-2.x.bat"
+ tofile="${maven.webserver.dir}/apache.bat" overwrite="true">
+ <ant:filterset refid="maven.webserver.filterset.default" />
+ <ant:filterset refid="maven.webserver.filterset" />
+ </ant:copy> -->
+ </define:tag>
+ </define:taglib>
</goal>
- <goal name="webserver:start-apache-2.x" description="Start Apache 2.x"
- prereqs="webserver:apache-2.x-reqs" >
- <j:choose>
+ <!--==================================================================-->
+ <!-- R E I N S T A L L -->
+ <!--==================================================================-->
+ <goal name="webserver:reinstall-apache-2.x"
+ prereqs="webserver:apache-2.x-reqs" description="Reinstall Apache 2.x">
+ <apache2x:install force="true"/>
+ </goal>
+
+ <!--==================================================================-->
+ <!-- I N S T A L L -->
+ <!--==================================================================-->
+ <goal name="webserver:install-apache-2.x" prereqs="webserver:apache-2.x-reqs"
+ description="Install Apache 2.x">
+ <apache2x:install force="false"/>
+ </goal>
+
+ <!--==================================================================-->
+ <!-- S T A R T -->
+ <!--==================================================================-->
+ <goal name="webserver:start-apache-2.x" prereqs="webserver:apache-2.x-reqs"
+ description="Start Apache 2.x" >
+
+ <j:choose>
<j:when test="${systemScope['os.name'].startsWith('Windows')}">
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
@@ -129,6 +155,9 @@
</j:choose>
</goal>
+ <!--==================================================================-->
+ <!-- R E S T A R T -->
+ <!--==================================================================-->
<goal name="webserver:restart-apache-2.x" description="Restart Apache 2.x"
prereqs="webserver:apache-2.x-reqs" >
@@ -158,6 +187,9 @@
</j:choose>
</goal>
+ <!--==================================================================-->
+ <!-- S T O P -->
+ <!--==================================================================-->
<goal name="webserver:stop-apache-2.x" description="Stop Apache 2.x"
prereqs="webserver:apache-2.x-reqs" >
@@ -189,6 +221,9 @@
</j:choose>
</goal>
+ <!--==================================================================-->
+ <!-- C L E A N -->
+ <!--==================================================================-->
<goal name="webserver:clean-apache-2.x" description="Clean Apache 2.x"
prereqs="webserver:apache-2.x-reqs" >
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org