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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
|
<?xml version="1.0"?>
<!--
~ Copyright 2002-2012 Drew Noakes
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
~ More information about this project is available at:
~
~ http://drewnoakes.com/code/exif/
~ http://code.google.com/p/metadata-extractor/
-->
<project name="metadata-extractor" default="test" basedir=".">
<description>metadata-extractor build file</description>
<property name="library-version" value="2.6.4"/>
<property name="java-version" value="1.6"/>
<property name="dist" location="Releases"/>
<property name="src" value="Source"/>
<property name="output" value="Output/Source"/>
<property name="test-src" value="Tests"/>
<property name="test-output" value="Output/Tests"/>
<property name="sample-src" value="Samples"/>
<property name="javadoc" value="Javadoc"/>
<property name="test.reports" value="TestReports"/>
<property name="lib" value="Libraries"/>
<property name="verbose" value="true"/>
<property name="debug" value="off"/>
<property name="classpath" value="${lib}/junit-4.8.2.jar;${lib}/xmpcore.jar"/>
<target name="clean" description="deletes and recreates the destination directory">
<delete verbose="${verbose}" dir="${output}"/>
<mkdir dir="${output}"/>
<delete verbose="${verbose}" dir="${test-output}"/>
<mkdir dir="${test-output}"/>
<mkdir dir="${dist}"/>
</target>
<target name="compile" description="compile the source">
<!-- TODO somehow exclude file "${src}/com/drew/metadata/test/SampleUsage.java" to get rid of warnings -->
<javac classpath="${classpath}"
srcdir="${src}"
destdir="${output}"
source="${java-version}"
target="${java-version}"
debug="${debug}"
encoding="UTF-8"
verbose="${verbose}"/>
<javac classpath="${classpath};${output}"
srcdir="${test-src}"
destdir="${test-output}"
source="${java-version}"
target="${java-version}"
debug="${debug}"
verbose="${verbose}"/>
<!--<copyfile src="LICENSE-2.0.txt" dest="${build}" forceoverwrite="true" />-->
</target>
<target name="test" depends="clean, compile" description="run all junit tests">
<delete verbose="${verbose}" dir="${test.reports}"/>
<mkdir dir="${test.reports}"/>
<junit printsummary="yes" logfailedtests="true" fork="yes" haltonfailure="yes">
<classpath>
<pathelement location="${output}"/>
<pathelement location="${test-output}"/>
<pathelement path="${java.class.path}"/>
<pathelement path="${lib}/junit-4.8.2.jar"/>
<pathelement path="${lib}/xmpcore.jar"/>
</classpath>
<formatter type="plain"/>
<!--<test name="com.drew.metadata.test.AllTests" />-->
<!--todir="${test.report.dir}"-->
<batchtest todir="${test.reports}">
<fileset dir="${test-src}">
<include name="**/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="dist-binaries" depends="clean, compile, test" description="generate binary distribution">
<property name="bin-jar" value="${dist}/metadata-extractor-${library-version}.jar" />
<property name="bin-zip" value="${dist}/metadata-extractor-${library-version}.zip" />
<jar destfile="${bin-jar}" update="false">
<manifest>
<attribute name="Main-Class" value="com.drew.imaging.ImageMetadataReader"/>
</manifest>
<fileset dir="${output}" />
<file file="LICENSE-2.0.txt" />
<file file="README.txt" />
</jar>
<zip file="${bin-zip}" comment="Metadata Extractor - http://drewnoakes.com/code/exif/">
<file file="${bin-jar}" />
<file file="${lib}/xmpcore.jar" />
<file file="LICENSE-2.0.txt" />
<file file="README.txt" />
</zip>
</target>
<target name="dist-source" depends="clean, compile, test" description="generate source distribution">
<jar destfile="${dist}/metadata-extractor-${library-version}-src.jar" update="false">
<fileset dir="." includes="${src}/**/*.java, ${test-src}/**/*.java, ${sample-src}/**/*.*, ${test-src}/**/*.jpg, ${test-src}/**/*.psd, ${test-src}/**/*.bytes, ${test-src}/**/*.metadata, ${src}/**/package.html, ${test-src}/**/package.html, ${lib}/junit.jar, build.xml"/>
<file file="LICENSE-2.0.txt" />
<file file="README.txt" />
</jar>
</target>
<target name="javadoc" description="generate javadoc documentation">
<delete verbose="${verbose}" dir="${javadoc}" />
<javadoc
destdir="${javadoc}"
encoding="UTF-8"
defaultexcludes="yes"
author="true"
version="true"
use="true"
access="protected"
windowtitle="Metadata-Extractor - JavaDoc - An Open Source Java Library for Image File Metadata"
failonerror="true">
<arg value="-notimestamp" />
<!-- be sure to only use single quotes in the CDATA sections below -->
<!-- TODO include <link rel='shortcut icon' href='http://metadata-extractor.googlecode.com/git/Resources/metadata-extractor.ico' /> -->
<header><![CDATA[<a href='http://www.drewnoakes.com/code/exif/' title='Go to the project home page.'><img src='http://metadata-extractor.googlecode.com/git/Resources/metadata-extractor-logo-131x30.png' border="0" alt='Metadata Extractor Logo'></a>]]></header>
<bottom><![CDATA[<i>Copyright © 2003-2012 Drew Noakes. All Rights Reserved.</i>]]></bottom>
<packageset dir="${src}" defaultexcludes="yes">
<include name="com/**"/>
<!--<exclude name="com/**/test"/>-->
</packageset>
<link href="/usr/share/doc/default-jdk-doc/api"/>
</javadoc>
<copy file="Resources/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="dist-all" depends="dist-source, dist-binaries" description="prepare source and binary distributions"/>
</project>
|