File: build.xml

package info (click to toggle)
jeuclid 3.1.9-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,668 kB
  • sloc: xml: 17,041; java: 14,962; sh: 20; makefile: 18
file content (84 lines) | stat: -rw-r--r-- 3,413 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<project default="jar" basedir="." name="jeuclid-cli">
  <property name="build.directory" value="target"/>
  <property name="build.output" value="${build.directory}/classes"/>
  <property environment="env"/>


  <path id="libs-build-classpath">
    <fileset dir="${basedir}/lib">
      <include name="*.jar"/>
    </fileset>
  </path>


  <target name="init" description="Init dependencies">
    <echo message="------------------- ${ant.project.name} ----------------"/>
    <echo message="${ant.version}"/>
    <echo message="VM: ${java.vm.version}, ${java.vm.vendor}"/>
    <echo message="JAVA_HOME: ${env.JAVA_HOME}"/>

    <available property="commonscli.present" classname="org.apache.commons.cli.CommandLine" classpathref="libs-build-classpath"/>
    <condition property="commonscli.message" value="commons-cli Support PRESENT">
      <equals arg1="${commonscli.present}" arg2="true"/>
    </condition>
    <condition property="commonscli.message" value="commons-cli Support NOT Present">
      <not>
        <equals arg1="${commonscli.present}" arg2="true"/>
      </not>
    </condition>
    <echo message="${commonscli.message}"/>

    <available property="commonslang.present" classname="org.apache.commons.lang.StringUtils" classpathref="libs-build-classpath"/>
    <condition property="commonslang.message" value="commons-lang Support PRESENT">
      <equals arg1="${commonslang.present}" arg2="true"/>
    </condition>
    <condition property="commonslang.message" value="commons-lang Support NOT Present">
      <not>
        <equals arg1="${commonslang.present}" arg2="true"/>
      </not>
    </condition>
    <echo message="${commonslang.message}"/>

    <available property="jeuclidcore.present" classname="net.sourceforge.jeuclid.LayoutContext" classpathref="libs-build-classpath"/>
    <condition property="jeuclidcore.message" value="jeuclid-core Support PRESENT">
      <equals arg1="${jeuclidcore.present}" arg2="true"/>
    </condition>
    <condition property="jeuclidcore.message" value="jeuclid-core Support NOT Present">
      <not>
        <equals arg1="${jeuclidcore.present}" arg2="true"/>
      </not>
    </condition>
    <echo message="${jeuclidcore.message}"/>

    <available property="xmlgraphics.present" classname="org.apache.xmlgraphics.util.ClasspathResource" classpathref="libs-build-classpath"/>
    <condition property="xmlgraphics.message" value="xmlgraphics-commons Support PRESENT">
      <equals arg1="${xmlgraphics.present}" arg2="true"/>
    </condition>
    <condition property="xmlgraphics.message" value="xmlgraphics-commons Support NOT Present">
      <not>
        <equals arg1="${xmlgraphics.present}" arg2="true"/>
      </not>
    </condition>
    <echo message="${xmlgraphics.message}"/>
  </target>


  <target name="compile" depends="init" description="Compile the code">
    <mkdir dir="${build.output}"/>
    <javac destdir="${build.output}" debug="true" deprecation="true" optimize="false">
      <src>
        <pathelement location="src/main/java"/>
      </src>
      <classpath refid="libs-build-classpath"/>
    </javac>
  </target>


  <target name="jar" depends="compile" description="Create the JAR">
    <jar jarfile="${build.directory}/${ant.project.name}.jar" basedir="${build.output}">
      <manifest>
        <attribute name="Main-Class" value="net.sourceforge.jeuclid.app.Mml2xxx"/>
      </manifest>
    </jar>
  </target>
</project>