# Directory Merge Maven Plugin

This is a maven plugin that provides directory/file merging/appending support to Maven.

## Goals

| 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. |

### Goal: `merge-files`

| Configuration Property | Data Type   | Required | Default | Description |
| ---------------------- |:-----------:|:--------:| ------- | ----------- |
| `filesets`             | `FileSet[]` | Yes      |         | Executes against these files. |
| `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. |
| `lineEnding`           | `string`    |          | `\n`    | Typically LF (`\n`) or CRLF (`\r\n`). |

### Goal: `merge-dirs`

| Configuration Property | Data Type   | Required | Default | Description |
| ---------------------- |:-----------:|:--------:| ------- | ----------- |
| `filesets`             | `FileSet[]` | Yes      |         | Executes against these files. |
| `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. |
| `lineEnding`           | `string`    |          | `\n`    | Typically LF (`\n`) or CRLF (`\r\n`). |

### Goal: `append-files`

| Configuration Property | Data Type   | Required | Default | Description |
| ---------------------- |:-----------:|:--------:| ------- | ----------- |
| `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. |
| `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. |
| `lineEnding`           | `string`    |          | `\n`    | Typically LF (`\n`) or CRLF (`\r\n`). |