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

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new dbb7515  Only build JAR files when contents is not up to date
dbb7515 is described below

commit dbb7515a9ef8ef3c0485d16b1403a284d29ff45e
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Sep 17 16:04:29 2020 +0100

    Only build JAR files when contents is not up to date
---
 build.xml                  | 51 +++++++++++++++++++++++++++++-----------------
 webapps/docs/changelog.xml |  4 ++++
 2 files changed, 36 insertions(+), 19 deletions(-)

diff --git a/build.xml b/build.xml
index 1ca32af..0a9e785 100644
--- a/build.xml
+++ b/build.xml
@@ -3631,28 +3631,41 @@ Read the Building page on the Apache Tomcat 
documentation site for details on ho
     <attribute name="libs" description="libraries to use for bnd classpath 
analysis relative to ${tomcat.output}"
                default="build/lib/*.jar,build/bin/tomcat-juli.jar" />
     <sequential>
-      <jar jarfile="@{jarfile}" manifest="@{manifest}">
-        <fileset dir="@{filesDir}">
+      <local name="jar.uptodate"/>
+      <uptodate property="jar.uptodate" targetfile="@{jarfile}" >
+        <srcfiles dir="@{filesDir}">
           <patternset refid="@{filesId}"/>
           <!-- Javadoc exclusions -->
           <exclude name="**/package.html" />
-        </fileset>
-        <zipfileset dir="@{meta-inf}" prefix="META-INF/"
-                    excludes=".gitignore" />
-        <zipfileset file="@{notice}" fullpath="META-INF/NOTICE" />
-        <zipfileset file="@{license}" fullpath="META-INF/LICENSE" />
-      </jar>
-      <antcall target="add-osgi" >
-        <param name="jarfile" value="@{jarfile}" />
-        <param name="addOSGi" value="@{addOSGi}" />
-        <param name="libs" value="@{libs}" />
-      </antcall>
-      <antcall target="add-graal">
-        <param name="jarfile" value="@{jarfile}" />
-        <param name="addGraal" value="@{addGraal}" />
-        <param name="graalFiles" value="@{graalFiles}" />
-        <param name="graalPrefix" value="@{graalPrefix}" />
-      </antcall>
+        </srcfiles>
+        <srcfiles dir="@{meta-inf}" excludes=".gitignore" />
+        <srcfiles file="@{notice}" />
+        <srcfiles file="@{license}" />
+      </uptodate>
+      <sequential unless:true="${jar.uptodate}">
+        <jar jarfile="@{jarfile}" manifest="@{manifest}" >
+          <fileset dir="@{filesDir}">
+            <patternset refid="@{filesId}"/>
+            <!-- Javadoc exclusions -->
+            <exclude name="**/package.html" />
+          </fileset>
+          <zipfileset dir="@{meta-inf}" prefix="META-INF/"
+                      excludes=".gitignore" />
+          <zipfileset file="@{notice}" fullpath="META-INF/NOTICE" />
+          <zipfileset file="@{license}" fullpath="META-INF/LICENSE" />
+        </jar>
+        <antcall target="add-osgi" >
+          <param name="jarfile" value="@{jarfile}" />
+          <param name="addOSGi" value="@{addOSGi}" />
+          <param name="libs" value="@{libs}" />
+        </antcall>
+        <antcall target="add-graal">
+          <param name="jarfile" value="@{jarfile}" />
+          <param name="addGraal" value="@{addGraal}" />
+          <param name="graalFiles" value="@{graalFiles}" />
+          <param name="graalPrefix" value="@{graalPrefix}" />
+        </antcall>
+      </sequential>
     </sequential>
   </macrodef>
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4792ad1..d6a3589 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -99,6 +99,10 @@
         adds a new feature to Procrun that outputs the command to 
(re-)configure
         the service with the current settings. (markt)
       </update>
+      <add>
+        When building, only rebuild JAR files (including OSGi and JPMS 
metadata)
+        if the contents has changed. (markt)
+      </add>
     </changelog>
   </subsection>
 </section>


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

Reply via email to