From: Siegfried G. <wd...@us...> - 2003-07-31 18:34:52
|
wdsgoe 03/07/31 11:34:52 Modified: webtest plugin.jelly Log: Hopefully fixed the "empty target bug" for ANT under Unix Revision Changes Path 1.6 +73 -38 maven-plugins/webtest/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/webtest/plugin.jelly,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- plugin.jelly 18 Jul 2003 09:30:01 -0000 1.5 +++ plugin.jelly 31 Jul 2003 18:34:52 -0000 1.6 @@ -1,7 +1,6 @@ <?xml version="1.0"?> <project - xmlns:ant="jelly:ant" xmlns:j="jelly:core" xmlns:util="jelly:util" xmlns:doc="doc" @@ -50,21 +49,23 @@ <goal name="webtest:info" description="Prints the configuration"> <echo> - maven.webtest.file = ${maven.webtest.file} - maven.webtest.target = ${maven.webtest.target} - maven.webtest.src = ${maven.webtest.src} - maven.webtest.config.host = ${maven.webtest.config.host} - maven.webtest.config.port = ${maven.webtest.config.port} - maven.webtest.config.protocol = ${maven.webtest.config.protocol} - maven.webtest.config.basepath = ${maven.webtest.config.basepath} - maven.webtest.config.summary = ${maven.webtest.config.summary} - maven.webtest.config.verbose = ${maven.webtest.config.verbose} - maven.webtest.config.saveresponse = ${maven.webtest.config.saveresponse} - maven.webtest.config.resultpath = ${maven.webtest.config.resultpath} - maven.webtest.config.resultfile = ${maven.webtest.config.resultfile} - maven.webtest.jar.fileset.dir = ${maven.webtest.jar.fileset.dir} - maven.webtest.jar.fileset.include = ${maven.webtest.jar.fileset.include} - maven.webtest.jar.fileset.exclude = ${maven.webtest.jar.fileset.exclude} + maven.webtest.src = ${maven.webtest.src} + maven.webtest.file = ${maven.webtest.file} + maven.webtest.target = ${maven.webtest.target} + maven.webtest.src = ${maven.webtest.src} + maven.webtest.config.host = ${maven.webtest.config.host} + maven.webtest.config.port = ${maven.webtest.config.port} + maven.webtest.config.protocol = ${maven.webtest.config.protocol} + maven.webtest.config.basepath = ${maven.webtest.config.basepath} + maven.webtest.config.summary = ${maven.webtest.config.summary} + maven.webtest.config.verbose = ${maven.webtest.config.verbose} + maven.webtest.config.saveresponse = ${maven.webtest.config.saveresponse} + maven.webtest.config.resultpath = ${maven.webtest.config.resultpath} + maven.webtest.config.resultfile = ${maven.webtest.config.resultfile} + maven.webtest.config.showhtmlparseroutput = ${maven.webtest.config.showhtmlparseroutput} + maven.webtest.config.haltonfailure = ${maven.webtest.config.haltonfailure} + maven.webtest.config.haltonerror = ${maven.webtest.config.haltonerror} + maven.webtest.ant.options = ${maven.webtest.ant.options} </echo> </goal> @@ -92,30 +93,64 @@ <pathelement path="${plugin.getDependencyClasspath()}"/> </path> + <!-- + On UNIX we seem to have a problem with empty command + line parameters. Therefore we explicitely check for + them and start ANT accordingly + --> + + <j:set var="hasAntOptions" value="${maven.webtest.ant.options}X"/> + <j:forEach var="testScriptFile" items="${testScripts.iterator()}"> - <echo>Processing ${testScriptFile.getName()}</echo> + <!-- echo>Processing ${testScriptFile.getName()}</echo --> <!-- Start an ANT process for each webtest script --> - <java classname="org.apache.tools.ant.Main" fork="yes" dir="${basedir}" failonerror="false"> - <classpath> - <path refid="webtest.classpath"/> - </classpath> - <sysproperty key="host" value="${maven.webtest.config.host}"/> - <sysproperty key="port" value="${maven.webtest.config.port}"/> - <sysproperty key="protocol" value="${maven.webtest.config.protocol}"/> - <sysproperty key="basepath" value="${maven.webtest.config.basepath}"/> - <sysproperty key="summary" value="${maven.webtest.config.summary}"/> - <sysproperty key="verbose" value="${maven.webtest.config.verbose}"/> - <sysproperty key="saveresponse" value="${maven.webtest.config.saveresponse}"/> - <sysproperty key="resultpath" file="${maven.webtest.config.resultpath}"/> - <sysproperty key="resultfile" file="${maven.webtest.config.resultfile}"/> - <sysproperty key="haltonfailure" value="${maven.webtest.config.haltonfailure}"/> - <sysproperty key="haltonerror" value="${maven.webtest.config.haltonerror}"/> - <sysproperty key="showhtmlparseroutput" value="${maven.webtest.config.showhtmlparseroutput}"/> - <arg value="${maven.webtest.ant.options}"/> - <arg value="-f"/> - <arg value="${testScriptFile}"/> - <arg value="${maven.webtest.target}"/> - </java> + <j:if test="${hasAntOptions != 'X'}"> + <echo>We have ANT options ...</echo> + <java classname="org.apache.tools.ant.Main" fork="yes" dir="${basedir}" failonerror="false"> + <classpath> + <path refid="webtest.classpath"/> + </classpath> + <sysproperty key="host" value="${maven.webtest.config.host}"/> + <sysproperty key="port" value="${maven.webtest.config.port}"/> + <sysproperty key="protocol" value="${maven.webtest.config.protocol}"/> + <sysproperty key="basepath" value="${maven.webtest.config.basepath}"/> + <sysproperty key="summary" value="${maven.webtest.config.summary}"/> + <sysproperty key="verbose" value="${maven.webtest.config.verbose}"/> + <sysproperty key="saveresponse" value="${maven.webtest.config.saveresponse}"/> + <sysproperty key="resultpath" file="${maven.webtest.config.resultpath}"/> + <sysproperty key="resultfile" file="${maven.webtest.config.resultfile}"/> + <sysproperty key="haltonfailure" value="${maven.webtest.config.haltonfailure}"/> + <sysproperty key="haltonerror" value="${maven.webtest.config.haltonerror}"/> + <sysproperty key="showhtmlparseroutput" value="${maven.webtest.config.showhtmlparseroutput}"/> + <arg value="${maven.webtest.ant.options}"/> + <arg value="-f"/> + <arg value="${testScriptFile}"/> + <arg value="${maven.webtest.target}"/> + </java> + </j:if> + <j:if test="${hasAntOptions == 'X'}"> + <!-- echo>We have no ANT options ...</echo --> + <java classname="org.apache.tools.ant.Main" fork="yes" dir="${basedir}" failonerror="false"> + <classpath> + <path refid="webtest.classpath"/> + </classpath> + <sysproperty key="host" value="${maven.webtest.config.host}"/> + <sysproperty key="port" value="${maven.webtest.config.port}"/> + <sysproperty key="protocol" value="${maven.webtest.config.protocol}"/> + <sysproperty key="basepath" value="${maven.webtest.config.basepath}"/> + <sysproperty key="summary" value="${maven.webtest.config.summary}"/> + <sysproperty key="verbose" value="${maven.webtest.config.verbose}"/> + <sysproperty key="saveresponse" value="${maven.webtest.config.saveresponse}"/> + <sysproperty key="resultpath" file="${maven.webtest.config.resultpath}"/> + <sysproperty key="resultfile" file="${maven.webtest.config.resultfile}"/> + <sysproperty key="haltonfailure" value="${maven.webtest.config.haltonfailure}"/> + <sysproperty key="haltonerror" value="${maven.webtest.config.haltonerror}"/> + <sysproperty key="showhtmlparseroutput" value="${maven.webtest.config.showhtmlparseroutput}"/> + <arg value="-f"/> + <arg value="${testScriptFile}"/> + <arg value="${maven.webtest.target}"/> + </java> + </j:if> </j:forEach> <echo>Finished running Canoo Webtest Plugin</echo> |