Maven Plugin to allow concatenation of files.
Forked from Bomas Contcat Maven Plugin.
This plugin is compiled against maven 3.2.5
, the last supported java 1.6 maven release, hosted on Maven Central.
<plugin>
<groupId>io.github.flaw101</groupId>
<artifactId>concat-maven-plugin</artifactId>
<version><!-- A Version --> </version>
<configuration>
<!-- Configure me -->
</configuration>
</plugin>
Mutation Testing, Code Formatting, OWASP Dependency Analysis, POM Ordering is all checked as part of the Travis CI build.
Multiple methods of concatenating can be supported, the current implementions are,
FILE_LIST
- Default setting, expects a list of
concatFiles
.
- Default setting, expects a list of
DIRECTORY
- Given a specified
directory
all files will be concatenated to the output ordered by file name.
- Given a specified
SEMVER
- Attempts to order a directory by SEMVER ordering.
Validations are in place to check only the specified parameters required by the Concatentation Type, and are usable.
e.g. directory
and concatFiles
params are mutually exclusive and should not be set at the same time.
e.g. All files when using FILE_LIST
must exist.
A basic example, which will concat the .input
files to the concatfile.output
.
<plugin>
<groupId>io.github.flaw101</groupId>
<artifactId>concat-maven-plugin</artifactId>
<configuration>
<concatenationType>FILE_LIST</concatenationType>
<outputFile>target/concatfile.output</outputFile>
<concatFiles>
<concatFile>src/test/resources/testfiles/file_1.input</concatFile>
<concatFile>src/test/resources/testfiles/file_2.input</concatFile>
<concatFile>src/test/resources/testfiles/file_3.input</concatFile>
</concatFiles>
</configuration>
</plugin>
Will concat all files in the directory to the output file.
<plugin>
<groupId>io.github.flaw101</groupId>
<artifactId>concat-maven-plugin</artifactId>
<configuration>
<outputFile>target/concatfile.output</outputFile>
<directory>src/test/resources/testfiles/</directory>
<concatenationType>
DIRECTORY
</concatenationType>
</configuration>
</plugin>
appendNewline
- Defaults to false, will add a new line character between each concatenated file.
deleteTargetFile
- Defaults to false, if they target file should be deleted before concatenation.
concatenationType
- For selecting different types of concatentation implementations. Defaults to requiring a list of files as specified in the basic example.
directory
- When using
ConcatenationType.DIRECTORY
specify the directory from which to get all files. Natural ordering of the file name is used to sort the files.
- When using
startingFile
- When using directory this file will be used as the starting file for concatenation.
- This file is always appended first regardless of the ordering applied.
- Correct maven dependencies to actually be able to test the project.
- Add ability to delete the target file.
- Add ability to concat by a directory.
- Set Commons IO to 2.5.
- UTF-8 is used to write and read files.
- Use Toolchain to build against Java 6.
- Updated to use Guice CDI
- Why not over engineer
- Remove final from
ConcatenationType
in mojo.
- Make
concatenationType
required. - Add debug logger for the parmas if enable.
- Move verification to CI profile
- Add
startingFile
param used inDIRECTORY
concatenation.- If specified this file will be the first file to be concatenated to with the rest following with natural ordering.
- Correct
startingFile
for astartingFile
that is contained within the same directory.
- Add SLF4J Simple Logger.
- Info, debug, and error logs are implemented for the flow of the plugin
- Add SEMVER conact type.
- Follows directory for the most part except file comparison attempts SEMVER ordering.