o simplify the Windows specific executable calls by using multiple os attribute values

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113207 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
plynch committed 2003-03-27 17:31:00 +00:00
1 parent de3d87ef7f
commit 8365c48afc
1 file changed
+34 -102
+34 -102
View File
@@ -49,27 +49,7 @@ ${maven.webserver.conf.dir}/conf/httpd.conf
<!-- 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 2000">
<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>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows NT">
<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>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows XP">
os="Windows NT,Windows 2000,Windows XP">
<ant:arg value="-d" />
<ant:arg line="${maven.webserver.root}" />
<ant:arg value="-f" />
@@ -95,7 +75,8 @@ ${maven.webserver.conf.dir}/conf/httpd.conf
<j:when test="${systemScope['os.name'].startsWith('Windows')}">
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows 2000">
os="Windows NT,Windows 2000,Windows XP"
resultProperty="maven.webserver.service_installed">
<ant:arg value="-d" />
<ant:arg line="${maven.webserver.root}" />
<ant:arg value="-f" />
@@ -104,30 +85,38 @@ ${maven.webserver.conf.dir}/conf/httpd.conf
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows NT">
<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 start" />
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
<j:if test="${context.getVariable('maven.webserver.service_installed') == 2}" >
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="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 start" />
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
<log:info trim="false">
Missing service detected. Trying to install a new webserver instance service...
</log:info>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows 2000,Windows NT,Windows XP" failonerror="true">
<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>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows 2000,Windows NT,Windows XP" failonerror="true">
<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 start" />
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
</j:if>
</j:when>
<j:otherwise>
<!-- nix nay on the wi nay assumes default apache install -->
<!-- nix nay on the winay assumes default apache install -->
<ant:exec executable="${maven.webserver.home}/bin/apachectl">
<ant:arg value="-d" />
<ant:arg line="${maven.webserver.root}" />
@@ -145,8 +134,9 @@ ${maven.webserver.conf.dir}/conf/httpd.conf
<j:choose>
<j:when test="${systemScope['os.name'].startsWith('Windows')}">
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows 2000">
os="Windows NT,Windows 2000,Windows XP">
<ant:arg value="-d" />
<ant:arg line="${maven.webserver.root}" />
<ant:arg value="-f" />
@@ -155,25 +145,6 @@ ${maven.webserver.conf.dir}/conf/httpd.conf
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows NT">
<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 restart" />
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="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 restart" />
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
</j:when>
<j:otherwise>
<ant:exec executable="${maven.webserver.home}/bin/apachectl">
@@ -192,28 +163,9 @@ ${maven.webserver.conf.dir}/conf/httpd.conf
<j:choose>
<j:when test="${systemScope['os.name'].startsWith('Windows')}">
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows 2000">
<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 stop" />
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows NT">
<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 stop" />
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows XP">
os="Windows NT,Windows 2000,Windows XP">
<ant:arg value="-d" />
<ant:arg line="${maven.webserver.root}" />
<ant:arg value="-f" />
@@ -244,27 +196,7 @@ ${maven.webserver.conf.dir}/conf/httpd.conf
<j:if test="${systemScope['os.name'].startsWith('Windows')}">
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows 2000">
<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 uninstall" />
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows NT">
<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 uninstall" />
<ant:arg line="-n ${maven.webserver.apache2x.service.name}" />
</ant:exec>
<ant:exec executable="${maven.webserver.home}\bin\apache.exe"
os="Windows XP">
os="Windows NT,Windows 2000,Windows XP">
<ant:arg value="-d" />
<ant:arg line="${maven.webserver.root}" />
<ant:arg value="-f" />