forked from Jmol-OVR/Jmol-OVR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildmp.xml
49 lines (42 loc) · 1.45 KB
/
buildmp.xml
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
<?xml version="1.0" ?>
<project name="MPJmolApp" default="jar" basedir=".">
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="lib.dir" value="lib"/>
<property name="jar.dir" value="${build.dir}"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="main-class" value="org.molecularplayground.MPJmolApp"/>
<path id="compile.classpath">
<fileset dir="${build.dir}" includes="Jmol.jar"/>
<!-- <fileset dir="${lib.dir}" includes="**/*.jar"/> -->
</path>
<target name="init">
<mkdir dir="${build.dir}"/>
</target>
<target name="compile" depends="init">
<javac destdir="${classes.dir}" includeantruntime="false">
<src path="${src.dir}"/>
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="clean">
<delete verbose="true">
<fileset dir="${build.dir}"/>
</delete>
</target>
<target name="jar" depends="compile">
<manifestclasspath property="jar.classpath" jarfile="${jar.dir}/${ant.project.name}.jar">
<classpath refid="compile.classpath"/>
</manifestclasspath>
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java jar="${jar.dir}/${ant.project.name}.jar" fork="true">
</java>
</target>
</project>