Skip to content

Commit

Permalink
Minor assembly tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
essiembre committed Sep 16, 2024
1 parent 0418427 commit 818f2a7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@
</executions>
</plugin>

<!-- https://www.mojohaus.org/license-maven-plugin/ -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
Expand Down Expand Up @@ -555,7 +554,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.10.0</version>
<configuration>
<outputDirectory>${project.build.directory}/site</outputDirectory>
<outputDirectory>${project.build.directory}</outputDirectory>
<sourcepath>${project.build.directory}/generated-sources/delombok</sourcepath>
<sourceFileIncludes>
<sourceInclude>com/norconex/**/*.java</sourceInclude>
Expand Down
4 changes: 2 additions & 2 deletions src/main/assembly/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<outputDirectory>./</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.build.directory}/site/apidocs</directory>
<outputDirectory>apidocs</outputDirectory>
<directory>${project.build.directory}/apidocs</directory>
<outputDirectory>./</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.build.directory}/generated-resources</directory>
Expand Down
4 changes: 2 additions & 2 deletions src/main/assembly/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 14 additions & 6 deletions src/main/java/com/norconex/commons/lang/jar/JarCopier.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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));
}
}
}

Expand Down

0 comments on commit 818f2a7

Please sign in to comment.