This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/main by this push:
     new 1f32d55d5 Align Java source compile configuration with Tomcat
1f32d55d5 is described below

commit 1f32d55d598b99cc5cb8369944bd75f3ff9d1144
Author: Michael Osipov <micha...@apache.org>
AuthorDate: Thu Oct 12 14:05:42 2023 +0200

    Align Java source compile configuration with Tomcat
---
 build.properties.default          |  8 ++++----
 build.xml                         | 18 ++++++++----------
 xdocs/miscellaneous/changelog.xml |  3 +++
 3 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index edc5342db..f97fc6e24 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -30,10 +30,10 @@ base.path=/usr/share/java
 #base.path=C:/path/to/the/repository
 #base.path=/usr/local
 
-compile.source=11
-compile.target=11
-compile.debug=off
-compile.deprecation=on
+# ----- Build control flags -----
+compile.debug=true
+# Do not pass -deprecation (-Xlint:deprecation) flag to javac
+compile.deprecation=false
 
 base-maven.loc=https://repo.maven.apache.org/maven2
 
diff --git a/build.xml b/build.xml
index df6ed702a..3be0ed0ca 100644
--- a/build.xml
+++ b/build.xml
@@ -54,6 +54,9 @@
 
     <property name="tc.library.path"       value="${basedir}/native/.libs"/>
 
+    <property name="compile.release" value="11"/>
+    <property name="build.java.version" value="11"/>
+
     <!-- The base directory for component sources -->
     <property name="source.home"           value="java"/>
 
@@ -197,12 +200,10 @@ limitations under the License.--&gt;">
     <target name="compile" depends="prepare" description="Compile Java 
sources">
         <mkdir dir="${build.dest}"/>
         <mkdir dir="${build.dest}/java"/>
-        <javac srcdir="${src.dir}/java"
-            destdir="${build.dest}/java"
-            source="${compile.source}"
-            target="${compile.target}"
+        <javac srcdir="${src.dir}/java" destdir="${build.dest}/java"
             debug="${compile.debug}"
             deprecation="${compile.deprecation}"
+            release="${compile.release}"
             encoding="ISO-8859-1"
             includeantruntime="false">
             <classpath refid="classpath"/>
@@ -237,13 +238,10 @@ limitations under the License.--&gt;">
     <target name="compile-tests" depends="compile" description="Compile Java 
test classes">
         <mkdir dir="${build.dest}"/>
         <mkdir dir="${build.dest}/test"/>
-        <javac srcdir="${src.dir}/test"
-            destdir="${build.dest}/test"
-            source="${compile.source}"
-            target="${compile.target}"
-            debug="on"
+        <javac srcdir="${src.dir}/test" destdir="${build.dest}/test"
+            debug="${compile.debug}"
             deprecation="${compile.deprecation}"
-            optimize="${compile.optimize}"
+            release="${compile.release}"
             encoding="ISO-8859-1"
             includeantruntime="false">
             <classpath refid="test.classpath"/>
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 88e9ed553..2dc11b1a9 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -46,6 +46,9 @@
     <update>
       Drop useless <code>compile.optimize</code> option. (michaelo)
     </update>
+    <update>
+      Align Java source compile configuration with Tomcat. (michaelo)
+    </update>
   </changelog>
 </section>
 <section name="Changes in 2.0.6">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to