BuildManagement:Ant: Unterschied zwischen den Versionen

Aus Alexander's Wiki
(Die Seite wurde neu angelegt: „= Existenz von Variablen = <source lang="xml"> <if> <isset property="TEST_CASE" /> <then> <echo>Variable existiert und Zuweisung folgt</echo> <pro…“)
 
 
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
[[Kategorie:BuildManagement]]
= Existenz von Variablen =
= Existenz von Variablen =


Zeile 12: Zeile 13:
     </else>
     </else>
   </if>
   </if>
</source>
= Java ausführen =
<source lang="xml">
  <target name="Targetname" depends="Abhängigkeit">
    <java classname="package.Klasse" failonerror="true" fork="yes">
      <arg line="properties1"/>
      <classpath refid="Projekt.classpath"/>
    </java>
  </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>