ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Rauch <Holger.Ra...@heitec.de>
Subject RE: Multiple Properties for the "unless" Attribute
Date Tue, 14 May 2002 17:39:31 GMT
Hi!

First of all, thanks for taking your time and trying to find a solution to
my problem. My try was as follows:

<!-- Check whether the JARs needed by all files can be found -->
  <!-- If so, create corresponding patternset -->
  <target name="validate-common-jars">
    <available
property="logpack.jar" value="${empic.lib}/logPack.jar" file="${empic.lib}/logPack.jar" />
    <available
property="i18n.jar" value="${allapps.path}/i18n.jar" file="${allapps.path}/i18n.jar" />
    <available
property="common-icons.jar" value="${allapps.path}/common-icons.jar" file="${allapps.path}/common-icons.jar"
/>
    <available
property="common-props.jar" value="${allapps.path}/common-props.jar" file="${allapps.path}/common-props.jar"
/>
    <patternset id="common-jars">
    <include name="${logpack.jar}" />
    <include name="${i18n.jar}" />
    <include name="${common-icons.jar}" />
    <include name="${common-props.jar}" />
  </patternset>
  </target>

  <target
name="fail-if-not-valid-common-jars" unless="logpack.jar,i18n.jar,common-icons.jar,common-props.jar">
    <fail>
      One or more of "logPack.jar", "i18n.jar", "common-icons.jar", or
"common-props.jar" seem to be missing. Please take a look at the contents
of the "WEB-INF/lib", or the "html" subdir.
    </fail>
  </target>

<target
name="sign-chg-pass" depends="genjar-chg-pass,validate-common-jars,fail-if-not-valid-common-jars">
    <signjar alias="empic.de" storepass="Seminumerical Algorithms !">
      <fileset refid="chg-pass-jars" />
    </signjar>
  </target>

This (specifying more than one attribute for "unless") doesn't seem to
work. The logic is that the target "sign-chg-pass" should only be executed
if "fail-if-not-valid-common-jars" didn't fail (which should be the case
if all JARs are in their corresponding subdirs). Am I doing something
wrong here?

Any advice will be greatly appreciated!

Regards,

	Holger



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message