Skip to content

Commit 8423569

Browse files
committed
Add Java source and target settings to compilation and manifest
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@797940 13f79535-47bb-0310-9956-ffa450edef68
1 parent dd61a2d commit 8423569

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

build.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ limitations under the License.
5151
<tstamp/>
5252
</target>
5353
<target name="compile" depends="static" description="Compile shareable components">
54-
<javac srcdir="${source.home}" destdir="${build.home}/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}">
54+
<javac srcdir="${source.home}" destdir="${build.home}/classes"
55+
source="${compile.source}" target="${compile.target}"
56+
debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}">
5557
<classpath refid="compile.classpath"/>
5658
</javac>
5759
<copy todir="${build.home}/classes" filtering="on">
@@ -110,6 +112,8 @@ limitations under the License.
110112
<attribute name="Implementation-Version" value="${component.version}"/>
111113
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
112114
<attribute name="Implementation-Vendor-Id" value="org.apache"/>
115+
<attribute name="X-Compile-Source-JDK" value="${compile.source}"/>
116+
<attribute name="X-Compile-Target-JDK" value="${compile.target}"/>
113117
</manifest>
114118
</jar>
115119
</target>
@@ -180,7 +184,9 @@ limitations under the License.
180184
</target>
181185
<!-- ========== Unit Test Targets ========================================= -->
182186
<target name="compile.tests" depends="compile" description="Compile unit test cases">
183-
<javac srcdir="${test.home}" destdir="${build.home}/tests" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}">
187+
<javac srcdir="${test.home}" destdir="${build.home}/tests"
188+
source="${compile.source}" target="${compile.target}"
189+
debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}">
184190
<classpath refid="test.classpath"/>
185191
</javac>
186192
<copy todir="${build.home}/tests" filtering="on">

default.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ compile.deprecation = true
6262
# Should Java compilations set the 'optimize' compiler option?
6363
compile.optimize = true
6464

65+
# Java version settings
66+
compile.source = 1.4
67+
compile.target = 1.4
68+
6569
# Should all tests fail if one does?
6670
test.failonerror = true
6771

0 commit comments

Comments
 (0)