From b29afab87661dc33a5f29641793b6c16d8637d82 Mon Sep 17 00:00:00 2001 From: Brian Long Date: Tue, 10 Jan 2023 17:45:05 -0500 Subject: [PATCH 1/3] fixed documentation --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8ccacf9..4d16f9f 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ This is a maven plugin that provides directory/file merging/appending support to | Goal | Description | | -------------------- | ----------- | -| `merge-files` | Merge the configured fileset of directories and their files into | -| `merge-dirs` | Apply a regular expression pattern against a set of property values, replacing matches with the specified text, and storing in new properties. | -| `append-files` | Apply a regular expression pattern against a property value, replacing matches with the specified text, and storing in a new property. | +| `merge-files` | Copy all the files in each fileset into a target directory; appending contents of any duplicate filenames. | +| `merge-dirs` | Copy all the directories in each fileset into a target directory; appending contents of duplicate filenames. | +| `append-files` | Append all the files in each fileset into a target file. | ### Goal: `merge-files` @@ -37,7 +37,7 @@ This is a maven plugin that provides directory/file merging/appending support to | ---------------------- |:-----------:|:--------:| ------- | ----------- | | `filesets` | `FileSet[]` | Yes | | Executes against these files. | | `includeHeader` | `boolean` | | `false` | Should a header be added for each appended file? | -| `outputFileName` | `string` | | `merged.txt` | The file to output from the merged filesets. | +| `outputFileName` | `string` | | `merged.txt` | The name of the file to output from the merged filesets; will be created in fileset output directory. | | `chunkSize` | `int` | | `1024` | The streaming buffer/chunk size in bytes, while merging files. Adjust for classic speed/memory trade-off. | | `encoding` | `string` | | `utf-8` | | | `spacing` | `int` | | `0` | How much spacing between appended files. | From 099219befe7212a4f76272a831981babbe2890bf Mon Sep 17 00:00:00 2001 From: "Brian M. Long" Date: Mon, 9 Feb 2026 15:26:51 -0500 Subject: [PATCH 2/3] upgraded dependencies and plugins --- pom.xml | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 07c4325..5d4bec3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,9 +21,9 @@ - scm:git:https://bitbucket.org/inteligr8/merge-maven-plugin.git - scm:git:git@bitbucket.org:inteligr8/merge-maven-plugin.git - https://bitbucket.org/inteligr8/merge-maven-plugin + scm:git:https://git.inteligr8.com/inteligr8/merge-maven-plugin.git + scm:git:git@git.inteligr8.com:inteligr8/merge-maven-plugin.git + https://git.inteligr8.com/inteligr8/merge-maven-plugin Inteligr8 @@ -42,19 +42,19 @@ UTF-8 1.8 1.8 - 3.6.3 + 3.9.11 org.apache.commons commons-lang3 - 3.4 + 3.20.0 org.apache.maven.shared file-management - 3.0.0 + 3.2.0 org.apache.maven @@ -65,7 +65,7 @@ org.apache.maven.plugin-tools maven-plugin-annotations - 3.6.0 + 3.15.1 provided @@ -89,16 +89,32 @@ junit junit - 4.12 + 4.13.2 test + + + + maven-plugin-plugin + 3.15.2 + + + maven-invoker-plugin + 3.9.1 + + + org.codehaus.plexus + plexus-component-metadata + 2.2.0 + + + maven-plugin-plugin - 3.6.0 regex @@ -120,7 +136,6 @@ org.codehaus.plexus plexus-component-metadata - 2.0.0 @@ -131,7 +146,6 @@ maven-invoker-plugin - 3.2.2 ${basedir}/src/it ${project.build.directory}/it @@ -167,7 +181,6 @@ maven-invoker-plugin - 3.2.2 run-its @@ -187,7 +200,7 @@ - ossrh-release + central-publish @@ -224,14 +237,13 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 true - ossrh - https://s01.oss.sonatype.org/ - true + central + true From 65a22509360c6a91c62d4c19ec96b4e44e85becd Mon Sep 17 00:00:00 2001 From: "Brian M. Long" Date: Mon, 9 Feb 2026 15:32:15 -0500 Subject: [PATCH 3/3] fix FileSetManager logging change --- .../java/com/inteligr8/maven/merge/AbstractMergeMojo.java | 8 ++++++-- .../com/inteligr8/maven/merge/AppendFilesContentMojo.java | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/inteligr8/maven/merge/AbstractMergeMojo.java b/src/main/java/com/inteligr8/maven/merge/AbstractMergeMojo.java index bfadf9a..e3dce4f 100755 --- a/src/main/java/com/inteligr8/maven/merge/AbstractMergeMojo.java +++ b/src/main/java/com/inteligr8/maven/merge/AbstractMergeMojo.java @@ -26,6 +26,8 @@ import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.shared.model.fileset.FileSet; import org.apache.maven.shared.model.fileset.util.FileSetManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This class provides general merging support for other goals. @@ -33,7 +35,9 @@ import org.apache.maven.shared.model.fileset.util.FileSetManager; * @author brian@inteligr8.com */ public abstract class AbstractMergeMojo extends AbstractFileContentMojo { - + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + @Parameter( property = "filesets", required = true ) protected List filesets; @@ -42,7 +46,7 @@ public abstract class AbstractMergeMojo extends AbstractFileContentMojo { this.getLog().debug("merge " + (directory ? "directories" : "files")); boolean didMerge = false; - FileSetManager fsman = new FileSetManager(this.getLog()); + FileSetManager fsman = new FileSetManager(this.logger); Path basepath = this.project.getBasedir().toPath(); try { diff --git a/src/main/java/com/inteligr8/maven/merge/AppendFilesContentMojo.java b/src/main/java/com/inteligr8/maven/merge/AppendFilesContentMojo.java index 4b0bbb8..6ac4708 100644 --- a/src/main/java/com/inteligr8/maven/merge/AppendFilesContentMojo.java +++ b/src/main/java/com/inteligr8/maven/merge/AppendFilesContentMojo.java @@ -25,6 +25,8 @@ import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.shared.model.fileset.FileSet; import org.apache.maven.shared.model.fileset.util.FileSetManager; import org.codehaus.plexus.component.annotations.Component; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This goal appends all the files in the configured fileset and writes that @@ -35,6 +37,8 @@ import org.codehaus.plexus.component.annotations.Component; @Mojo( name = "append-files", threadSafe = true ) @Component( role = org.apache.maven.plugin.Mojo.class ) public class AppendFilesContentMojo extends AbstractFileContentMojo { + + private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Parameter( property = "filesets", required = true ) protected List filesets; @@ -55,7 +59,7 @@ public class AppendFilesContentMojo extends AbstractFileContentMojo { private boolean appendContentInFileSet() throws MojoExecutionException { int spacing = Math.max(this.includeHeader ? 1 : 0, this.spacing); boolean didMerge = false; - FileSetManager fsman = new FileSetManager(this.getLog()); + FileSetManager fsman = new FileSetManager(this.logger); Path basepath = this.project.getBasedir().toPath(); try {