Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.class
*.bak*
*.orig*

# Package Files #
*.jar
Expand All @@ -7,6 +9,11 @@

# Maven build workspace #
target/
*.releaseBackup
release.properties

# NIT generated configs, if running from workspace root
tmp/

/.idea/
/jNut*.tar.gz
7 changes: 7 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 0 additions & 1 deletion jNut/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions jNut/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 0 additions & 1 deletion jNutList/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
org.apache.maven.plugins ...which is assumed by default.
-->
<artifactId>maven-assembly-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
Expand Down
2 changes: 0 additions & 2 deletions jNutWebAPI/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.10.0</version>
<executions>
<execution>
<phase>validate</phase>
Expand Down
39 changes: 39 additions & 0 deletions make-tarballs.sh
Original file line number Diff line number Diff line change
@@ -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
50 changes: 50 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,56 @@
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.5.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.10.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.21.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
Loading