o updating to better match the protocol found in the webserver plugin git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113400 13f79535-47bb-0310-9956-ffa450edef68
121 lines
4.9 KiB
XML
Executable File
121 lines
4.9 KiB
XML
Executable File
<?xml version="1.0"?>
|
|
|
|
<project xmlns:j="jelly:core" xmlns:log="jelly:log" xmlns:ant="jelly:ant"
|
|
xmlns:tomcat4x="http://www.maven.org/plugin/appserver/tomcat4x"
|
|
xmlns:define="jelly:define" >
|
|
|
|
<goal name="appserver:tomcat-4.0.x-reqs"
|
|
description="Intialize resources for tomcat processing">
|
|
|
|
<!-- Check if user has http.conf in a conf dir -->
|
|
<ant:available file="${maven.appserver.conf.dir}/conf/server.xml"
|
|
type="file" property="maven.appserver.tomcat4x.has.conf" value="true" />
|
|
|
|
<ant:fail unless="maven.appserver.tomcat4x.has.conf">
|
|
To use this appserver, you must have a project specific
|
|
configuration file at the following location:
|
|
|
|
${maven.appserver.conf.dir}/conf/server.xml
|
|
</ant:fail>
|
|
|
|
<define:taglib uri="http://www.maven.org/plugin/appserver/tomcat4x">
|
|
|
|
<!-- accept the force property with a value of true or false -->
|
|
<define:tag name="install">
|
|
|
|
<j:if test="${force == 'false'}">
|
|
<!-- Create common directories and copy configuration files -->
|
|
<mkdir dir="${maven.appserver.dir}/conf"/>
|
|
<mkdir dir="${maven.appserver.dir}/work"/>
|
|
<mkdir dir="${maven.appserver.dir}/temp"/>
|
|
<mkdir dir="${maven.appserver.dir}/webapps"/>
|
|
<mkdir dir="${maven.appserver.dir}/logs"/>
|
|
</j:if>
|
|
|
|
<!-- copy any user configuration files w/ filtering by forcing copy -->
|
|
<!-- if reinstall -->
|
|
<ant:copy todir="${maven.appserver.dir}" overwrite="${force}">
|
|
<ant:fileset dir="${maven.appserver.conf.dir}" />
|
|
<ant:filterset refid="maven.appserver.filterset.default" />
|
|
</ant:copy>
|
|
|
|
</define:tag>
|
|
</define:taglib>
|
|
|
|
</goal>
|
|
|
|
<!--==================================================================-->
|
|
<!-- R E I N S T A L L -->
|
|
<!--==================================================================-->
|
|
<goal name="appserver:reinstall-tomcat-4.0.x"
|
|
prereqs="appserver:tomcat-4.0.x-reqs" description="Reinstall Tomcat 4.0.x">
|
|
<tomcat4x:install force="true"/>
|
|
</goal>
|
|
|
|
<!--==================================================================-->
|
|
<!-- I N S T A L L -->
|
|
<!--==================================================================-->
|
|
<goal name="appserver:install-tomcat-4.0.x" prereqs="appserver:tomcat-4.0.x-reqs"
|
|
description="Install Tomcat 4.0.x">
|
|
<tomcat4x:install force="false"/>
|
|
</goal>
|
|
|
|
<!--==================================================================-->
|
|
<!-- S T A R T -->
|
|
<!--==================================================================-->
|
|
<goal name="appserver:start-tomcat-4.0.x" prereqs="appserver:tomcat-4.0.x-reqs"
|
|
description="Start Tomcat 4.0.x" >
|
|
|
|
<java classname="org.apache.catalina.startup.Bootstrap" fork="yes"
|
|
dir="${maven.appserver.dir}">
|
|
<classpath>
|
|
<pathelement path="${maven.appserver.classpath}"/>
|
|
<fileset dir="${maven.appserver.home}">
|
|
<include name="bin/bootstrap.jar"/>
|
|
</fileset>
|
|
</classpath>
|
|
<jvmarg value="-Dcatalina.base=${maven.appserver.dir}"/>
|
|
<jvmarg value="-Dcatalina.home=${maven.appserver.home}"/>
|
|
<arg value="start"/>
|
|
</java>
|
|
|
|
</goal>
|
|
|
|
<!--==================================================================-->
|
|
<!-- R E S T A R T -->
|
|
<!--==================================================================-->
|
|
<goal name="appserver:restart-tomcat-4.0.x" description="Restart Tomcat 4.0.x"
|
|
prereqs="appserver:tomcat-4.0.x-reqs" >
|
|
<ant:fail message="Not yet supported." />
|
|
</goal>
|
|
|
|
<!--==================================================================-->
|
|
<!-- S T O P -->
|
|
<!--==================================================================-->
|
|
<goal name="appserver:stop-tomcat-4.0.x" description="Stop Tomcat 4.0.x"
|
|
prereqs="appserver:tomcat-4.0.x-reqs" >
|
|
|
|
<java classname="org.apache.catalina.startup.Bootstrap" fork="yes"
|
|
dir="${maven.appserver.dir}">
|
|
<classpath>
|
|
<pathelement path="${maven.appserver.classpath}"/>
|
|
<fileset dir="${maven.appserver.home}">
|
|
<include name="bin/bootstrap.jar"/>
|
|
</fileset>
|
|
</classpath>
|
|
<jvmarg value="-Dcatalina.base=${maven.appserver.dir}"/>
|
|
<jvmarg value="-Dcatalina.home=${maven.appserver.home}"/>
|
|
<arg value="stop"/>
|
|
</java>
|
|
</goal>
|
|
|
|
<!--==================================================================-->
|
|
<!-- C L E A N -->
|
|
<!--==================================================================-->
|
|
<goal name="appserver:clean-tomcat-4.0.x" description="Clean Tomcat 4.0.x"
|
|
prereqs="appserver:tomcat-4.0.x-reqs" >
|
|
|
|
</goal>
|
|
|
|
</project>
|