-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbuild.xml
45 lines (34 loc) · 1.32 KB
/
build.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
<project name="OpenChemLib" default="jar" basedir=".">
<!-- those properties are generic and don't have to be changed-->
<property name="project" value="${ant.project.name}" />
<property name="src.dir" value="src/main/java" />
<property name="res.dir" value="src/main/resources" />
<property name="build.dir" value="build" />
<path id="srcs">
<dirset dir="." includes="${src.dir}" />
</path>
<!-- targets -->
<target name="clean">
<echo message="Cleaning..."/>
<delete dir="${build.dir}" failonerror="false" />
</target>
<target name="compile">
<mkdir dir="${build.dir}" />
<javac
destdir="${build.dir}"
failonerror="true" source="1.8" target="1.8" debug="false" encoding="ISO-8859-1">
<src refid="srcs" />
<include name="**/*.java" />
</javac>
<copy overwrite="true" todir="${build.dir}">
<fileset dir="${res.dir}" includes="**/*" />
</copy>
</target>
<target name="jar" depends="compile">
<jar basedir="${build.dir}" includes="**/*" excludes="**/*.jar" destfile="${build.dir}/${project}.jar" >
<manifest>
<attribute name="Created-By" value="${user.name}" />
</manifest>
</jar>
</target>
</project>