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

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


The following commit(s) were added to refs/heads/1.2.x by this push:
     new 06fd25f1e Align Java source compile configuration with Tomcat
06fd25f1e is described below

commit 06fd25f1e717d34d50e1938dc449540e79519277
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                         | 19 ++++++++++---------
 xdocs/miscellaneous/changelog.xml |  3 +++
 3 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 5ddd86f88..37e678139 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=1.8
-compile.target=1.8
-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 e7fa10232..96358892d 100644
--- a/build.xml
+++ b/build.xml
@@ -55,6 +55,10 @@
 
     <property name="tc.library.path"       value="${basedir}/native/.libs"/>
 
+    <property name="compile.source" value="1.8"/>
+    <property name="compile.target" value="1.8"/>
+    <property name="build.java.version" value="1.8"/>
+
     <!-- The base directory for component sources -->
     <property name="source.home"           value="java"/>
 
@@ -204,12 +208,11 @@ 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}"
+            source="${compile.source}"
+            target="${compile.target}"
             encoding="ISO-8859-1"
             includeantruntime="false">
             <classpath refid="classpath"/>
@@ -244,13 +247,11 @@ 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"
+        <javac srcdir="${src.dir}/test" destdir="${build.dest}/test"
+            debug="${compile.debug}"
+            deprecation="${compile.deprecation}"
             source="${compile.source}"
             target="${compile.target}"
-            debug="on"
-            deprecation="${compile.deprecation}"
-            optimize="${compile.optimize}"
             encoding="ISO-8859-1"
             includeantruntime="false">
             <classpath refid="test.classpath"/>
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index 34e0a77ef..a80514dbf 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -35,6 +35,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 1.2.39">


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

Reply via email to