From 818f2a7feaea20f868ec35b29187b68f6cf6bbe3 Mon Sep 17 00:00:00 2001 From: Pascal Essiembre Date: Sun, 15 Sep 2024 23:00:21 -0400 Subject: [PATCH] Minor assembly tweaks. --- pom.xml | 3 +-- src/main/assembly/dist.xml | 4 ++-- src/main/assembly/install.bat | 4 ++-- .../norconex/commons/lang/jar/JarCopier.java | 20 +++++++++++++------ 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index fd78b7b1..a8990348 100644 --- a/pom.xml +++ b/pom.xml @@ -476,7 +476,6 @@ - org.codehaus.mojo license-maven-plugin @@ -555,7 +554,7 @@ maven-javadoc-plugin 3.10.0 - ${project.build.directory}/site + ${project.build.directory} ${project.build.directory}/generated-sources/delombok com/norconex/**/*.java diff --git a/src/main/assembly/dist.xml b/src/main/assembly/dist.xml index 1d1c094c..56c057f7 100644 --- a/src/main/assembly/dist.xml +++ b/src/main/assembly/dist.xml @@ -41,8 +41,8 @@ ./ - ${project.build.directory}/site/apidocs - apidocs + ${project.build.directory}/apidocs + ./ ${project.build.directory}/generated-resources diff --git a/src/main/assembly/install.bat b/src/main/assembly/install.bat index 1c5eccc2..e2985cfc 100644 --- a/src/main/assembly/install.bat +++ b/src/main/assembly/install.bat @@ -17,8 +17,8 @@ cd %~dp0 echo. echo PLEASE READ CAREFULLY echo. -echo To install this component and its into an existing installation, -echo please specify the target directory where Java libraries +echo To install this component and its dependencies into an existing +echo installation, please specify the target directory where Java libraries echo (.jar files) are stored. This is often a "lib" directory. echo. echo If .jar duplicates are found, you will be asked how you wish to deal with diff --git a/src/main/java/com/norconex/commons/lang/jar/JarCopier.java b/src/main/java/com/norconex/commons/lang/jar/JarCopier.java index d2bcfd8b..cc711bdf 100644 --- a/src/main/java/com/norconex/commons/lang/jar/JarCopier.java +++ b/src/main/java/com/norconex/commons/lang/jar/JarCopier.java @@ -44,7 +44,6 @@ import lombok.NonNull; import lombok.With; import lombok.experimental.Accessors; -import lombok.extern.slf4j.Slf4j; /** * Performs a version-sensitive copy a Jar file or directory containing Jar @@ -53,7 +52,6 @@ * this application to be run from a command prompt. * @since 1.10.0 */ -@Slf4j public class JarCopier { //MAYBE option to do a dry-run (show table-like findings + expected result) @@ -345,16 +343,26 @@ private static String createTimestamp() { private static void error(String error, Object... args) { if (commandLine) { System.err.println(String.format(error, args)); //NOSONAR - } else if (LOG.isErrorEnabled()) { - LOG.error(String.format(error, args)); + } else { + // declaring logging here to prevent warnings on command prompt + // where deps may not be present. + var LOG = org.slf4j.LoggerFactory.getLogger(JarCopier.class); + if (LOG.isErrorEnabled()) { + LOG.error(String.format(error, args)); + } } } private static void info(String info, Object... args) { if (commandLine) { System.out.println(String.format(info, args)); //NOSONAR - } else if (LOG.isInfoEnabled()) { - LOG.info(String.format(info, args)); + } else { + // declaring logging here to prevent warnings on command prompt + // where deps may not be present. + var LOG = org.slf4j.LoggerFactory.getLogger(JarCopier.class); + if (LOG.isInfoEnabled()) { + LOG.info(String.format(info, args)); + } } }