From 273ca3b2901d8508917e289a7a0928082d94f6b9 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 9 Apr 2026 16:27:42 +0200 Subject: [PATCH 1/6] */pom.xml: consolidate maven plugin version management in parent POM Signed-off-by: Jim Klimov --- jNutList/pom.xml | 1 - jNutWebAPI/pom.xml | 2 -- pom.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/jNutList/pom.xml b/jNutList/pom.xml index 544560d..d4372a9 100644 --- a/jNutList/pom.xml +++ b/jNutList/pom.xml @@ -30,7 +30,6 @@ org.apache.maven.plugins ...which is assumed by default. --> maven-assembly-plugin - 3.8.0 jar-with-dependencies diff --git a/jNutWebAPI/pom.xml b/jNutWebAPI/pom.xml index efec050..5060a8f 100644 --- a/jNutWebAPI/pom.xml +++ b/jNutWebAPI/pom.xml @@ -53,7 +53,6 @@ org.apache.maven.plugins maven-war-plugin - 3.5.1 false @@ -61,7 +60,6 @@ org.apache.maven.plugins maven-dependency-plugin - 3.10.0 validate diff --git a/pom.xml b/pom.xml index ed80fc0..ac0418a 100644 --- a/pom.xml +++ b/pom.xml @@ -57,6 +57,56 @@ + + org.apache.maven.plugins + maven-clean-plugin + 3.5.0 + + + org.apache.maven.plugins + maven-resources-plugin + 3.5.0 + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.5 + + + org.apache.maven.plugins + maven-jar-plugin + 3.5.0 + + + org.apache.maven.plugins + maven-install-plugin + 3.1.4 + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.4 + + + org.apache.maven.plugins + maven-war-plugin + 3.5.1 + + + org.apache.maven.plugins + maven-dependency-plugin + 3.10.0 + + + org.apache.maven.plugins + maven-assembly-plugin + 3.8.0 + + + org.apache.maven.plugins + maven-site-plugin + 3.21.0 + From e5f658c50a6b065df5bb489813a7d91208af138f Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 9 Apr 2026 16:29:32 +0200 Subject: [PATCH 2/6] GitIgnore some more patterns Signed-off-by: Jim Klimov --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 96ade20..4be5a7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ *.class +*.bak* +*.orig* # Package Files # *.jar @@ -7,6 +9,10 @@ # Maven build workspace # target/ +*.releaseBackup +release.properties # NIT generated configs, if running from workspace root tmp/ + +/.idea/ From db011d320841bfb3feb1aa2c63b6438355761065 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 9 Apr 2026 16:32:06 +0200 Subject: [PATCH 3/6] README.adoc: add references to NIT website and GitHub repositories Signed-off-by: Jim Klimov --- README.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.adoc b/README.adoc index 2d301f7..fc3354e 100644 --- a/README.adoc +++ b/README.adoc @@ -8,6 +8,13 @@ The `test-NIT.sh` script can be used to arrange a NUT driver+server setup using the NUT Integration Test suite script (you can find it in the main NUT repository). +For more details about the NUT ecosystem, please see +https://networkupstools.org/ and +https://github.com/networkupstools/nut/ + +Sources of this project can be found at +https://github.com/networkupstools/jNut/ + Java NUT Client files ~~~~~~~~~~~~~~~~~~~~~ From 8a21a4a5c532595f22a7ca1c60ed47e79309f16f Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 9 Apr 2026 16:45:20 +0200 Subject: [PATCH 4/6] jNut/README.adoc: current maven generates javadocs into target/reports/apidocs (not target/site/apidocs) Signed-off-by: Jim Klimov --- jNut/README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jNut/README.adoc b/jNut/README.adoc index dc4f2a3..ea53468 100644 --- a/jNut/README.adoc +++ b/jNut/README.adoc @@ -47,8 +47,8 @@ You can generate jNut javadoc by typing: mvn javadoc:javadoc -Documentation will be generated in the `target/site/apidocs` subdirectory, -and its entry point is located at `target/site/apidocs/index.html`. +Documentation will be generated in the `target/reports/apidocs` subdirectory, +and its entry point is located at `target/reports/apidocs/index.html`. Workspace cleaning ^^^^^^^^^^^^^^^^^^ From a7b1b17115050aabe1cf6f215633dfa42770f36e Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 9 Apr 2026 16:49:40 +0200 Subject: [PATCH 5/6] jNut/.gitignore was not needed anymore Signed-off-by: Jim Klimov --- jNut/.gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 jNut/.gitignore diff --git a/jNut/.gitignore b/jNut/.gitignore deleted file mode 100644 index eb5a316..0000000 --- a/jNut/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target From 2dfd0dbd91b45d221b4150eb0f9cdcf399efa788 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 9 Apr 2026 17:10:37 +0200 Subject: [PATCH 6/6] Introduce make-tarballs.sh helper for reproducible tarballs Signed-off-by: Jim Klimov --- .gitignore | 1 + make-tarballs.sh | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 make-tarballs.sh diff --git a/.gitignore b/.gitignore index 4be5a7a..604493b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ release.properties tmp/ /.idea/ +/jNut*.tar.gz diff --git a/make-tarballs.sh b/make-tarballs.sh new file mode 100755 index 0000000..bcad6dd --- /dev/null +++ b/make-tarballs.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +# Helper to create tarballs for NUT-Website publication +set -e +set -u + +POM_VERSION="`mvn -B -q help:evaluate -Dexpression=project.version -DforceStdout`" +echo "${POM_VERSION}" + +rm -rf tmp/tarballs +mkdir -p tmp/tarballs/jNut-"${POM_VERSION}" tmp/tarballs/jNutWebAPI-"${POM_VERSION}" + +MVN_ARGS="-B" +if [ x"$1" = x-f ] ; then + mvn $MVN_ARGS clean + MVN_ARGS="$MVN_ARGS -U" +fi + +mvn $MVN_ARGS package || exit + +# Local dependencies for javadocs stage: +mvn $MVN_ARGS install || exit +mvn $MVN_ARGS javadoc:javadoc || exit + +# Library and sample client go together: +tar cz --exclude target -f tmp/tarballs/jNut-"${POM_VERSION}"/jNut-"${POM_VERSION}"-src.tar.gz jNut +tar cz --exclude target -f tmp/tarballs/jNut-"${POM_VERSION}"/jNutList-"${POM_VERSION}"-src.tar.gz jNutList +cp LICENSE.md README.adoc test-NIT.sh tmp/tarballs/jNut-"${POM_VERSION}"/ +cp jNut/target/*.jar jNutList/target/*.jar tmp/tarballs/jNut-"${POM_VERSION}"/ +cp -r jNut/target/reports/apidocs/ tmp/tarballs/jNut-"${POM_VERSION}"/jNut-apidocs/ +cp -r jNutList/target/reports/apidocs/ tmp/tarballs/jNut-"${POM_VERSION}"/jNutList-apidocs/ + +# REST API is larger and standalone (as an artifact): +tar cz --exclude target -f tmp/tarballs/jNutWebAPI-"${POM_VERSION}"/jNutWebAPI-"${POM_VERSION}"-src.tar.gz jNutWebAPI +cp jNutWebAPI/target/*.war tmp/tarballs/jNutWebAPI-"${POM_VERSION}"/ +cp -r jNutWebAPI/target/reports/apidocs/ tmp/tarballs/jNutWebAPI-"${POM_VERSION}"/jNutWebAPI-apidocs/ + +(cd tmp/tarballs/ && tar czf - jNut-"${POM_VERSION}") > jNut-"${POM_VERSION}".tar.gz +(cd tmp/tarballs/ && tar czf - jNutWebAPI-"${POM_VERSION}") > jNutWebAPI-"${POM_VERSION}".tar.gz