You can optionally specify the source files to process via an external configuration file. When a bundleConfiguration is defined, it overrides cssSourceFiles and jsSourceFile of the Basic Configuration.
<project> <!-- ... --> <build> <plugins> <!-- ... --> <plugin> <groupId>com.samaxes.maven</groupId> <artifactId>minify-maven-plugin</artifactId> <version>1.7.6</version> <executions> <execution> <id>bundle-minify</id> <configuration> <bundleConfiguration>src/minify/static-bundles.json</bundleConfiguration> </configuration> <goals> <goal>minify</goal> </goals> </execution> </executions> </plugin> <!-- ... --> </plugins> </build> <!-- ... --> </project>
Bundles are defined in JSON format.
{ "bundles": [ { "type": "css", "name": "static-combined.css", "files": [ "reset.css", "fonts.css", "base.css", "toc.css" ] }, { "type": "js", "name": "static-combined.js", "files": [ "samaxesjs.core.js", "subdir/samaxesjs.toc.js" ] } ] }