BuildManagement:Ant: Unterschied zwischen den Versionen

Aus Alexander's Wiki
K (Admin verschob Seite Ant nach BuildManagement:Ant)
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 1: Zeile 1:
[[Kategorie:BuildManagement]]
= Existenz von Variablen =
= Existenz von Variablen =


Zeile 25: Zeile 26:
   </target>
   </target>


</source>
= Return code zurückgeben =
<source lang="xml">
  <target name="runtex2pdf">
    <exec executable="/bin/bash"
          dir="."
  resultproperty="App.state"
  failonerror="true">
      <arg line="tex2pdf.sh"/>
    </exec>
    <echo message="LaTeX generation state: ${App.state}" />
  </target>
</source>
</source>

Aktuelle Version vom 16. Oktober 2015, 07:24 Uhr

Existenz von Variablen

  <if>
    <isset property="TEST_CASE" />
    <then>
	<echo>Variable existiert und Zuweisung folgt</echo>
	<property name="propertiesFile" value="import/${TEST_CASE}" />
    </then>
    <else>
	<echo>Variable existiert NICHT</echo>
    </else>
  </if>

Java ausführen

  <target name="Targetname" depends="Abhängigkeit">
    <java classname="package.Klasse" failonerror="true" fork="yes">
       <arg line="properties1"/>
       <classpath refid="Projekt.classpath"/>
    </java>
  </target>

Return code zurückgeben

  <target name="runtex2pdf">
    <exec executable="/bin/bash"
          dir="."
	  resultproperty="App.state"
	  failonerror="true">
       <arg line="tex2pdf.sh"/>
    </exec>
    <echo message="LaTeX generation state: ${App.state}" />
  </target>