Provides a collection of tools for working with directories.
Add this snippet into pom.xml inside tag <project><build><plugins>:
goals: |
---|
directory-content:copy
(phase: process-sources)
Copies files from source to output directory. |
directory-content:copyFile
(phase: process-sources)
Copies file from source to output directory (allow to change name). |
directory-content:transformList
(phase: generate-sources)
Transforms files list to a document using XSLT technology. The XML document used to transformation process has specified structure: <files> <file> <fullPath>full file path</fullPath> <fullName>name with extension</fullName> <name>name without extension</name> <!-- extension node is optionally --> <extension>extension</extension> <directory>parent directory relative to ${directory.content.sourceDirectory}</directory> <size>size in bytes</size> </file> <!-- more file nodes --> </files> Example: <files> <file> <fullPath>static/js/script.js</fullPath> <fullName>script.js</fullName> <name>script</name> <extension>js</extension> <directory>static/js</directory> <size>131072</size> </file> <file> <fullPath>static/js/file-without-extension</fullPath> <fullName>file-without-extension</fullName> <name>file-without-extension</name> <directory>static/js</directory> <size>28672</size> </file> </files> |
directory-content:transformMetadata
(phase: generate-sources)
Transforms files metadata to documents using XSLT technology. Each file metadata used to transformation process has specified structure: <file> <fullPath>full file path</fullPath> <fullName>name with extension</fullName> <name>name without extension</name> <!-- extension node is optionally --> <extension>extension</extension> <directory>parent directory relative to ${directory.content.sourceDirectory}</directory> <size>size in bytes</size> </file> Examples: <file> <fullPath>static/js/script.js</fullPath> <fullName>script.js</fullName> <name>script</name> <extension>js</extension> <directory>static/js</directory> <size>131072</size> </file> <file> <fullPath>static/js/file-without-extension</fullPath> <fullName>file-without-extension</fullName> <name>file-without-extension</name> <directory>static/js</directory> <size>28672</size> </file> |