Skip to content

Commit

Permalink
Explicitly setting JDK version in build file. The previous build was …
Browse files Browse the repository at this point in the history
…accidentally built at Java 1.7 when only 1.6 is required. The code compiles against 1.5, however the XMPCore code was built using JDK 1.6. Once plugin support is implemented, it may be possible to break this out.
  • Loading branch information
drewnoakes committed Dec 23, 2012
1 parent 1cfcced commit 7dc6e93
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,20 @@

<description>metadata-extractor build file</description>

<property name="version" value="2.6.3"/>
<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"/>
<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}"/>
Expand All @@ -52,11 +53,15 @@
<javac classpath="${classpath}"
srcdir="${src}"
destdir="${output}"
source="${java-version}"
target="${java-version}"
debug="${debug}"
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" />-->
Expand Down Expand Up @@ -85,8 +90,8 @@
</target>

<target name="dist-binaries" depends="clean, compile, test" description="generate binary distribution">
<property name="bin-jar" value="${dist}/metadata-extractor-${version}.jar" />
<property name="bin-zip" value="${dist}/metadata-extractor-${version}.zip" />
<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"/>
Expand All @@ -105,8 +110,8 @@
</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, ${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, ChangeLog.txt"/>
<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>
Expand Down

0 comments on commit 7dc6e93

Please sign in to comment.