From cae3da4bd8fc567ee1e7a6b90416e7909aa5b7b7 Mon Sep 17 00:00:00 2001 From: Tony Germano Date: Thu, 1 Jan 2026 00:38:59 -0500 Subject: [PATCH 1/5] Build: Archives to use modified time of last commit Previously all class files and resources were added to the built jars with the build time. With this change the jar, war, and zip tasks will use the time stamp from the HEAD commit as the modified times of the entries in order to work towards reproducable builds. If unable to get the modified time of the last commit, the value will default to the timestamp of when the openintegrationengine.org domain was registered. Signed-off-by: Tony Germano --- client/ant-build.xml | 85 ++++++++-------- command/build.xml | 7 +- donkey/build.xml | 7 +- generator/build.xml | 9 +- manager/ant-build.xml | 5 +- server/build.xml | 221 +++++++++++++++++++++-------------------- server/mirth-build.xml | 5 + webadmin/build.xml | 6 +- 8 files changed, 185 insertions(+), 160 deletions(-) diff --git a/client/ant-build.xml b/client/ant-build.xml index 6385a80eed..98c03ee018 100644 --- a/client/ant-build.xml +++ b/client/ant-build.xml @@ -13,6 +13,9 @@ + + + @@ -102,7 +105,7 @@ - + @@ -113,203 +116,203 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/command/build.xml b/command/build.xml index 0582b82103..5f2976030f 100644 --- a/command/build.xml +++ b/command/build.xml @@ -5,6 +5,9 @@ + + + @@ -38,12 +41,12 @@ - + - + diff --git a/donkey/build.xml b/donkey/build.xml index 861849bf59..02bdf86e54 100644 --- a/donkey/build.xml +++ b/donkey/build.xml @@ -6,6 +6,9 @@ + + + @@ -32,7 +35,7 @@ - + @@ -44,7 +47,7 @@ - + diff --git a/generator/build.xml b/generator/build.xml index b5647c7ae1..4a0fe6e102 100644 --- a/generator/build.xml +++ b/generator/build.xml @@ -5,6 +5,9 @@ + + + @@ -20,7 +23,7 @@ - + @@ -47,9 +50,9 @@ - + - \ No newline at end of file + diff --git a/manager/ant-build.xml b/manager/ant-build.xml index 652d6744fc..9cd6423473 100644 --- a/manager/ant-build.xml +++ b/manager/ant-build.xml @@ -11,6 +11,9 @@ + + + @@ -39,7 +42,7 @@ - + diff --git a/server/build.xml b/server/build.xml index abd8d5d606..308c0abc35 100644 --- a/server/build.xml +++ b/server/build.xml @@ -17,6 +17,9 @@ + + + @@ -110,13 +113,13 @@ - + - + @@ -144,11 +147,11 @@ - + - + @@ -167,13 +170,13 @@ - + - + @@ -193,7 +196,7 @@ - + @@ -206,7 +209,7 @@ - + @@ -231,14 +234,14 @@ - + - + @@ -259,7 +262,7 @@ - + @@ -267,7 +270,7 @@ - + @@ -289,13 +292,13 @@ - + - + @@ -315,11 +318,11 @@ - + - + @@ -337,12 +340,12 @@ - + - + @@ -361,12 +364,12 @@ - + - + @@ -385,11 +388,11 @@ - + - + @@ -407,7 +410,7 @@ - + @@ -416,7 +419,7 @@ - + @@ -446,13 +449,13 @@ - + - + @@ -468,11 +471,11 @@ - + - + @@ -491,11 +494,11 @@ - + - + @@ -509,12 +512,12 @@ - + - + @@ -529,11 +532,11 @@ - + - + @@ -547,11 +550,11 @@ - + - + @@ -565,11 +568,11 @@ - + - + @@ -583,11 +586,11 @@ - + - + @@ -601,11 +604,11 @@ - + - + @@ -619,11 +622,11 @@ - + - + @@ -639,11 +642,11 @@ - + - + @@ -659,7 +662,7 @@ - + @@ -686,10 +689,10 @@ - + - + @@ -704,7 +707,7 @@ - + @@ -717,7 +720,7 @@ - + @@ -731,7 +734,7 @@ - + @@ -756,7 +759,7 @@ - + @@ -770,7 +773,7 @@ - + @@ -784,7 +787,7 @@ - + @@ -799,7 +802,7 @@ - + @@ -813,10 +816,10 @@ - + - + @@ -831,10 +834,10 @@ - + - + @@ -871,7 +874,7 @@ - + @@ -886,11 +889,11 @@ - + - + @@ -906,7 +909,7 @@ - + @@ -920,7 +923,7 @@ - + @@ -934,7 +937,7 @@ - + @@ -1011,7 +1014,7 @@ - + @@ -1027,10 +1030,10 @@ - + - + @@ -1041,7 +1044,7 @@ - + @@ -1150,45 +1153,45 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1277,7 +1280,7 @@ - + diff --git a/server/mirth-build.xml b/server/mirth-build.xml index 73dda90fde..74fa064d80 100644 --- a/server/mirth-build.xml +++ b/server/mirth-build.xml @@ -4,6 +4,11 @@ + + + + + diff --git a/webadmin/build.xml b/webadmin/build.xml index 2a3de7e594..86c5914db7 100644 --- a/webadmin/build.xml +++ b/webadmin/build.xml @@ -15,6 +15,8 @@ + + @@ -66,7 +68,7 @@ - + @@ -76,4 +78,4 @@ - \ No newline at end of file + From ab34440cbe1ca23dfd643dcb4ea1405cfe6012e9 Mon Sep 17 00:00:00 2001 From: Tony Germano Date: Thu, 1 Jan 2026 23:46:40 -0500 Subject: [PATCH 2/5] Build: Inject git version in Javadocs and improve reproducibility This patch updates the Ant build process to include Git versioning information in the generated Javadocs and ensures the build remains robust in environments without Git. Changes include: - Implemented a new `exec-with-default` macro in `mirth-build.xml`. This safely attempts to retrieve the Git hash and version name but falls back to default values ("unknown") if the `.git` directory is missing (e.g., source tarballs) or Git is not installed. - Updated the Javadoc target to inject a footer containing the build version. - Added conditional logic to render a hyperlink to the GitHub commit only if the revision is available; otherwise, it renders plain text. - Added the `-notimestamp` flag to the Javadoc task to support reproducible builds (ensuring identical output for identical input). - Refactored argument passing (switched from `line` to `value`) and added proper Ant namespaces for conditional execution. Signed-off-by: Tony Germano --- server/build.xml | 25 +++++++++++++++--- server/mirth-build.xml | 59 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 77 insertions(+), 7 deletions(-) diff --git a/server/build.xml b/server/build.xml index 308c0abc35..6f545c6cbf 100644 --- a/server/build.xml +++ b/server/build.xml @@ -1,5 +1,5 @@ - + @@ -1200,12 +1200,29 @@ + + + + + + + + + - - - + + ${git.commit.name}
]]> + Mozilla Public License 2.0.]]> +
+ + ]]> + Mozilla Public License 2.0.]]> + + + +
diff --git a/server/mirth-build.xml b/server/mirth-build.xml index 74fa064d80..86bb35d626 100644 --- a/server/mirth-build.xml +++ b/server/mirth-build.xml @@ -1,14 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + Using git.commit.timestamp of [${git.commit.timestamp}] + + + + + + Using git.commit.hash of [${git.commit.hash}] + + + + + + + + + + + + + Using git.commit.name of [${git.commit.name}] From d38b3375bd6d28c084838b11ffb77347b12147fe Mon Sep 17 00:00:00 2001 From: Tony Germano Date: Tue, 6 Jan 2026 02:00:25 -0500 Subject: [PATCH 3/5] Build: Add ignoreDirtyWorkTree property Setting the value of this property to true will omit the `--dirty` flag to `git describe` when generating the `git.commit.name`. This is helpful when comparing the build output to a previous build after making an uncommited change. Signed-off-by: Tony Germano --- server/mirth-build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/mirth-build.xml b/server/mirth-build.xml index 86bb35d626..a09d3afd9d 100644 --- a/server/mirth-build.xml +++ b/server/mirth-build.xml @@ -1,4 +1,4 @@ - + @@ -58,7 +58,7 @@ - + Using git.commit.name of [${git.commit.name}] From 198889f023c4a3b815e5f42baa3b752fcd17c773 Mon Sep 17 00:00:00 2001 From: Tony Germano Date: Tue, 6 Jan 2026 01:11:54 -0500 Subject: [PATCH 4/5] Build: Workflow performs partial clone Set checkout action options to perform a partial clone that omits all blob objects (files) and trees except for those that belong to the head commit. All commit objects and tags will be downloaded to allow `git describe` to work in the CI environment. Signed-off-by: Tony Germano --- .github/workflows/build.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ec879d84c3..061438f64e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,6 +14,10 @@ jobs: steps: - uses: actions/checkout@v4 + with: + filter: 'tree:0' + fetch-depth: 0 + fetch-tags: true - name: Set up JDK uses: actions/setup-java@v4 From 2872ebc337fa67cea10b40c8e872407b4ebaa166 Mon Sep 17 00:00:00 2001 From: Tony Germano Date: Tue, 6 Jan 2026 01:51:48 -0500 Subject: [PATCH 5/5] Build: Move defaults for detected build properties The default values for the following properties are now specified in the .properties files in the event that git is unavailable when building the project: - git.commit.timestamp - git.commit.hash - git.commit.name The default properties have the same names as the properties above with a `.default` suffix. Signed-off-by: Tony Germano --- client/ant-build.xml | 2 +- client/build.properties | 4 +++- command/build.properties | 4 +++- command/build.xml | 2 +- donkey/build.properties | 2 ++ donkey/build.xml | 2 +- generator/build.properties | 4 +++- generator/build.xml | 2 +- manager/ant-build.xml | 2 +- manager/build.properties | 4 +++- server/build.properties | 2 ++ server/build.xml | 2 +- server/mirth-build.properties | 5 +++++ server/mirth-build.xml | 6 +++--- 14 files changed, 30 insertions(+), 13 deletions(-) diff --git a/client/ant-build.xml b/client/ant-build.xml index 98c03ee018..d29e53ec95 100644 --- a/client/ant-build.xml +++ b/client/ant-build.xml @@ -14,7 +14,7 @@
- + diff --git a/client/build.properties b/client/build.properties index 4a6727c78b..d21d47d6a6 100644 --- a/client/build.properties +++ b/client/build.properties @@ -11,4 +11,6 @@ logs=${basedir}/logs dist=${basedir}/dist # jars -client.jar=mirth-client.jar \ No newline at end of file +client.jar=mirth-client.jar + +git.commit.timestamp.default=1999-01-01T00:00:00.000Z diff --git a/command/build.properties b/command/build.properties index 87fc0ae726..cf9584db13 100644 --- a/command/build.properties +++ b/command/build.properties @@ -12,4 +12,6 @@ server=${basedir}/../server # jars cli.jar=mirth-cli.jar -cli-launcher.jar=mirth-cli-launcher.jar \ No newline at end of file +cli-launcher.jar=mirth-cli-launcher.jar + +git.commit.timestamp.default=1999-01-01T00:00:00.000Z diff --git a/command/build.xml b/command/build.xml index 5f2976030f..77f151c0ef 100644 --- a/command/build.xml +++ b/command/build.xml @@ -7,7 +7,7 @@ - + diff --git a/donkey/build.properties b/donkey/build.properties index ee14b3777c..95aad32302 100644 --- a/donkey/build.properties +++ b/donkey/build.properties @@ -18,3 +18,5 @@ model.jar=donkey-model.jar setup=${basedir}/setup setup.lib=${setup}/lib setup.docs=${setup}/docs + +git.commit.timestamp.default=1999-01-01T00:00:00.000Z diff --git a/donkey/build.xml b/donkey/build.xml index 02bdf86e54..00d562b94c 100644 --- a/donkey/build.xml +++ b/donkey/build.xml @@ -8,7 +8,7 @@ - + diff --git a/generator/build.properties b/generator/build.properties index a9c57025ab..37c7487401 100644 --- a/generator/build.properties +++ b/generator/build.properties @@ -9,4 +9,6 @@ vocab.src=${vocab}/src vocab.classes=${vocab}/classes vocab.dist=${vocab}/dist vocab.version=1.2 -vocab.jar=mirth-vocab-${vocab.version}.jar \ No newline at end of file +vocab.jar=mirth-vocab-${vocab.version}.jar + +git.commit.timestamp.default=1999-01-01T00:00:00.000Z diff --git a/generator/build.xml b/generator/build.xml index 4a0fe6e102..709bf0e9d9 100644 --- a/generator/build.xml +++ b/generator/build.xml @@ -7,7 +7,7 @@ - + diff --git a/manager/ant-build.xml b/manager/ant-build.xml index 9cd6423473..55cbfaed16 100644 --- a/manager/ant-build.xml +++ b/manager/ant-build.xml @@ -12,7 +12,7 @@ - + diff --git a/manager/build.properties b/manager/build.properties index a2b0f4ece8..a9bb83dca1 100644 --- a/manager/build.properties +++ b/manager/build.properties @@ -7,4 +7,6 @@ dist=${basedir}/dist dist.source=${dist}/source # jars -manager.jar=mirth-manager-launcher.jar \ No newline at end of file +manager.jar=mirth-manager-launcher.jar + +git.commit.timestamp.default=1999-01-01T00:00:00.000Z diff --git a/server/build.properties b/server/build.properties index 00c2e82760..bcb098a173 100644 --- a/server/build.properties +++ b/server/build.properties @@ -49,3 +49,5 @@ setup.docs=${setup}/docs dist=${basedir}/dist dist.extensions=${dist}/extensions test.dist=${basedir}/testdist + +git.commit.timestamp.default=1999-01-01T00:00:00.000Z diff --git a/server/build.xml b/server/build.xml index 6f545c6cbf..4b8c48bd43 100644 --- a/server/build.xml +++ b/server/build.xml @@ -18,7 +18,7 @@ - + diff --git a/server/mirth-build.properties b/server/mirth-build.properties index 411999332f..447c51e458 100644 --- a/server/mirth-build.properties +++ b/server/mirth-build.properties @@ -5,3 +5,8 @@ webadmin=../webadmin manager=../manager cli=../command version=4.5.2 + +# set default values if git is unavailable +git.commit.timestamp.default=1999-01-01T00:00:00.000Z +git.commit.hash.default= +git.commit.name.default=unavailable diff --git a/server/mirth-build.xml b/server/mirth-build.xml index a09d3afd9d..bf20cdb8f6 100644 --- a/server/mirth-build.xml +++ b/server/mirth-build.xml @@ -39,19 +39,19 @@ --> - + Using git.commit.timestamp of [${git.commit.timestamp}] - + Using git.commit.hash of [${git.commit.hash}] - +