forked from ecologylab/BigSemanticsJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
125 lines (107 loc) · 5.03 KB
/
build.xml
File metadata and controls
125 lines (107 loc) · 5.03 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0"?>
<project name="metadata-extractor" default="jar" basedir=".">
<!-- update the java runtime location (esp. if in *nix environment) -->
<!--
<property name="java.rt.dir" value="/usr/local/jdk1.7.0_03/jre/lib" />
-->
<description>metadata-extractor for java build file</description>
<property name="dist" location="Releases"/>
<property name="build" value="Output"/>
<property name="src" value="Source"/>
<property name="javadoc" value="Javadoc"/>
<property name="lib" value="Libraries"/>
<property name="verbose" value="true"/>
<property name="debug" value="off"/>
<property name="version" value="2.4.0-beta-1"/>
<property name="classpath" value="${lib}/junit.jar"/>
<!--
<path id="bootclasspath">
<fileset dir="${java.rt.dir}" includes="rt.jar" />
</path>
-->
<target name="clean" description="deletes and recreates the destination directory">
<delete verbose="${verbose}" dir="${build}"/>
<delete dir="${build}"/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
</target>
<target name="compile" description="compile the source">
<javac classpath="${classpath}"
srcdir="${src}"
destdir="${build}"
debug="${debug}"
verbose="${verbose}"/>
</target>
<target name="dist-binaries" depends="clean, compile, test" description="generate binary distribution">
<jar destfile="${dist}/metadata-extractor-${version}.jar" update="false">
<manifest>
<attribute name="Main-Class" value="com.drew.imaging.ImageMetadataReader"/>
</manifest>
<fileset dir="${build}" excludes="**/test/*.class" />
</jar>
</target>
<target name="dist-source" depends="clean, compile, test" description="generate source distribution">
<jar destfile="${dist}/metadata-extractor-${version}-src.jar" update="false">
<fileset dir="."
includes="${src}/**/*.java, ${src}/**/*.jpg, ${src}/**/*.metadata, ${src}/**/package.html, ${lib}/junit.jar, build.xml, ChangeLog.txt"/>
</jar>
</target>
<target name="test" depends="compile" description="run all junit tests">
<junit printsummary="yes" fork="yes" haltonfailure="yes">
<classpath>
<pathelement location="${build}"/>
<pathelement path="${java.class.path}"/>
</classpath>
<formatter type="plain"/>
<test name="com.drew.metadata.test.AllTests"/>
</junit>
</target>
<target name="javadoc" description="generate javadoc documentation">
<copy file="Website/metadata-extractor-logo-30px.gif" todir="${javadoc}" />
<javadoc
destdir="${javadoc}"
defaultexcludes="yes"
author="true"
version="true"
use="true"
access="protected"
windowtitle="metadata-extractor javadoc"
failonerror="true">
<!-- be sure to only use single quotes in the CDATA sections below -->
<header><![CDATA[<link rel='shortcut icon' href='http://www.drewnoakes.com/code/exif/MetadataExtractor.ico' /><a href='http://www.drewnoakes.com/code/exif/' title='Go to the project home page.'><img src='http://www.drewnoakes.com/code/exif/javadoc/metadata-extractor-logo-30px.gif' border="0" alt='Metadata Extractor Logo'></a>]]></header>
<bottom><![CDATA[<i>Copyright © 2006 Drew Noakes. All Rights Reserved.</i>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-936661-1";
urchinTracker();
</script>]]></bottom>
<packageset dir="${src}" defaultexcludes="yes">
<include name="com/**"/>
<exclude name="com/**/test"/>
</packageset>
</javadoc>
<copy file="Website/javadoc-stylesheet.css" tofile="${javadoc}/stylesheet.css" overwrite="yes" />
</target>
<target name="all" depends="dist-source, dist-binaries, javadoc" description="prepare source and binary distributions, and javadoc"/>
<target name="copy-jpg">
<copy todir="build/classes/com">
<fileset dir="src/com" includes="**/*.jpg" />
</copy>
</target>
<!-- a separate rule added as a build.xml was already existing in the directory -->
<target name="jar">
<mkdir dir="build/jar" />
<mkdir dir="build/classes" />
<!--
<javac srcdir="." destdir="build/classes"
bootclasspathref="bootclasspath"
classpath="${classpath}" source="1.6" target="1.6" encoding="iso-8859-1" />
-->
<javac srcdir="src" destdir="build/classes" includeJavaRuntime="yes"
classpath="${classpath}" source="1.6" target="1.6" encoding="iso-8859-1">
<compilerarg value="-XDignore.symbol.file" />
</javac>
<antcall target="copy-jpg" />
<jar destfile="build/jar/imageMetadataExtractor.jar" basedir="build/classes" />
</target>
</project>