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

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


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

commit f80a6755924838543cabca2a1dea3b2d53f467ff
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                  | 29 +++++++++++++++++++++--------
 webapps/docs/changelog.xml |  4 ++++
 2 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/build.xml b/build.xml
index c593a87..327ce0b 100644
--- a/build.xml
+++ b/build.xml
@@ -3272,17 +3272,30 @@ Read the Building page on the Apache Tomcat 
documentation site for details on ho
     <attribute name="meta-inf" description="additional contents for META-INF"
                default="${tomcat.manifests}/default" />
     <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>
+        </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>
+      </sequential>
     </sequential>
   </macrodef>
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 32591c0..861d8fc 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -92,6 +92,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 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