ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22223] New: - bogus condition results
Date Thu, 07 Aug 2003 16:28:58 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22223>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22223

bogus condition results

           Summary: bogus condition results
           Product: Ant
           Version: 1.5.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: elkner@linofee.org


In the following example, the condition property "throw.no.message" should
not be set and thus give a fail message, however, it evaluates to true :((


<!DOCTYPE project >
<project name="condition.bug" default="dist" basedir=".">
                     <!-- USER PROPERTIES -->
<property name="enable.signatures" value="false"/>
<property name="enable.jnlp" value="true"/>

                     <!-- TARGETS -->
<target name="init">
	<condition property="do.signatures">
		<istrue value="${enable.signatures}"/>
	</condition>
	<condition property="do.jnlp">
		<istrue value="${enable.jnlp}"/>
	</condition>
</target>

<target name="signatures.needed" depends="init">
	<condition property="throw.no.message">
		<or>			
			<not>
				<isset property="do.jnlp"/>
			</not>
			<and>
				<isset property="do.jnlp"/>
				<isfalse   value="do.jnlp"/>
			</and>
			<and>
				<isset property="do.jnlp"/>
				<istrue   value="do.jnlp"/>
				<isset property="do.signatures"/>
				<istrue   value="do.signatures"/>
			</and>
		</or>
	</condition>
</target>

<target name="no.signatures" depends="signatures.needed" unless="throw.no.message">
	<fail message="jar signatures are not enabled. JNLP would not work!!! 
	Set the property 'enable.signatures' to 'true' before deploying JNLP
	files."/>
</target>

<target name="cp.jnlp" depends="init,no.signatures" if="do.jnlp">
	<echo message="would copy jnlp stuff"/>
</target>

<target name="sign.jars" depends="init" if="do.signatures">
	<echo message="would sign jars"/>
</target>

<target name="dist" depends="init,sign.jars,cp.jnlp"/>

</project>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message