-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.xml
executable file
·95 lines (74 loc) · 2.92 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
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
85
86
87
88
89
90
91
92
93
94
95
<?xml version="1.0" encoding="UTF-8"?>
<!-- Ant build file for DesignWizard. -->
<project basedir="." default="build" name="design_wizard">
<property file="build.properties" />
<path id="lib.path">
<fileset dir="${designwizard.lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
<mkdir dir="${designwizard.output.dir}" />
<mkdir dir="${designwizard.docs.dir}" />
<mkdir dir="${designwizard.dist.dir}" />
<mkdir dir="${designwizard.dist.lib.dir}" />
</target>
<target name="compile" depends="init">
<javac sourcepath="1.5" srcdir="${designwizard.src.dir}" classpath="${java.classpath}" destdir="${designwizard.output.dir}" debug="on" optimize="on">
</javac>
</target>
<target name="clean">
<delete dir="${designwizard.output.dir}" />
<delete dir="${designwizard.dist.dir}" />
<delete dir="${designwizard.docs.dir}" />
<delete file="${designwizard.jar}" />
<delete file="${designwizard-executable.jar}" />
</target>
<target name="build">
<antcall target="clean" />
<antcall target="compile" />
<antcall target="jar" />
<antcall target="javadoc" />
</target>
<!-- DOJAVADOC -->
<target name="javadoc">
<mkdir dir="${designwizard.docs.dir}" />
<javadoc author="true" classpath="${java.classpath}" destdir="${designwizard.docs.dir}" sourcepath="${designwizard.src.dir}" use="true" version="true" windowtitle="Design Wizard" excludepackagenames="**/test/**">
<fileset dir="${designwizard.src.dir}" defaultexcludes="yes">
</fileset>
</javadoc>
</target>
<!-- Group all dependencies into a big dependency-all.jar -->
<target name="copy-dependencies">
<jar jarfile="${designwizard.dist.lib.dir}/dependencies-all.jar">
<zipgroupfileset dir="${designwizard.lib.dir}">
<include name="**/*.jar" />
</zipgroupfileset>
</jar>
</target>
<!-- MAKEJAR WITH ASM EMBEDDED -->
<target name="jarWithDependencies" depends="compile, copy-dependencies" description="package, output to JAR">
<jar destfile="${designwizard-executable.jar}" basedir="${designwizard.output.dir}">
<manifest>
<attribute name="Main-Class" value="${designwizard.main.class}" />
</manifest>
<zipfileset src="${designwizard.dist.lib.dir}/dependencies-all.jar" excludes="META-INF/*.SF" />
</jar>
</target>
<!-- MAKEJAR WITHOUT ASM -->
<target name="jar" description="creates a jar file ">
<jar destfile="${designwizard.jar}">
<fileset dir="${designwizard.dist.lib.dir}" excludes="**/*Test.class" />
</jar>
</target>
<!-- Run unit tests -->
<target name="unit" depends="compile,jarWithDependencies">
<java fork="yes" classname="junit.swingui.TestRunner" taskname="junit" failonerror="true">
<arg value="org.designwizard.test.AllTest" />
<classpath>
<pathelement path="${java.classpath}" />
</classpath>
</java>
</target>
<!-- mvn install:install-file -Dfile=designwizard-1.4.jar -DgroupId=org -DartifactId=designwizard -Dversion=1.4 -Dpackaging=jar -->
</project>