o we need to use ant conditions for some things. when running maven console ant properties are cached. So added code to remove them from the context before executing the ant conditions. This way maven console seems to always start fresh. Except of course for filtersets. I don't know how to remove filtersets from the context.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113385 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
plynch 2003-04-24 20:39:41 +00:00
parent 64f07707cc
commit e53ca6a817

View File

@ -4,6 +4,7 @@
<!-- W E B S E R V E R P L U G I N -->
<!-- ================================================================== -->
<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:log="jelly:log"
xmlns:util="jelly:util"
xmlns:exception="http://www.maven.org/plugin/webserver/exception"
xmlns:webserver="http://www.maven.org/plugin/webserver"
xmlns:define="jelly:define" >
@ -126,9 +127,11 @@
</j:choose>
<!-- Check the home dir to see if it exists -->
<ant:condition property="maven.webserver.home.exists">
<ant:available file="${maven.webserver.home}" type="dir" />
</ant:condition>
<!-- hack to work around maven console caching property values -->
<j:remove var="maven.webserver.conf.dir.exists" />
<util:available file="${maven.webserver.home}">
<j:set var="maven.webserver.home.exists" value="true" />
</util:available>
<j:if test="${!context.getVariable('maven.webserver.home.exists')}">
<exception:invalidPropertyDirectory propname="maven.webserver.home"
propvalue="${maven.webserver.home}" />
@ -149,9 +152,10 @@
<j:if test="${context.getVariable('maven.webserver.fullname') == null}">
<exception:requiredPropertyMissing propname="maven.webserver.fullname" />
</j:if>
<ant:condition property="maven.webserver.conf.dir.exists">
<ant:available file="${maven.webserver.conf.dir}" type="dir" />
</ant:condition>
<j:remove var="maven.webserver.conf.dir.exists" />
<util:available file="${maven.webserver.conf.dir}">
<j:set var="maven.webserver.conf.dir.exists" value="true" />
</util:available>
<j:if test="${!context.getVariable('maven.webserver.conf.dir.exists')}">
<exception:invalidPropertyDirectory propname="maven.webserver.conf.dir"
propvalue="${maven.webserver.conf.dir}" />
@ -196,6 +200,7 @@
</ant:filterset>
<!-- a flag to see if the webserver is started -->
<j:remove var="maven.webserver.started" />
<ant:condition property="maven.webserver.started">
<ant:and>
<ant:socket server="${maven.webserver.host}"
@ -208,6 +213,7 @@
</ant:condition>
<!-- a flag to see if the webserver is installed -->
<j:remove var="maven.webserver.installed" />
<ant:condition property="maven.webserver.installed">
<ant:and>
<ant:available file="${maven.webserver.root}" type="dir" />