This plugin supports include/exclude patterns. When bundling into one file, the order in which the source files were specified is preserved. Specifically:
include
, find all files matching the wildcard pattern (observing the excludes
).include
, sort the matching files alphabetically.include
in the order the includes
were specified.
<project> <!-- ... --> <build> <plugins> <!-- ... --> <plugin> <groupId>com.github.blutorange</groupId> <artifactId>closure-compiler-maven-plugin</artifactId> <version>8.0</version> <executions> <execution> <id>default-minify</id> <configuration> <!-- When bundling into one file, first adds prerequisite files, then custom files. --> <includes> <include>**/*Prerequisites.js</include> <include>**/*Custom.js</include> </includes> <excludes> <exclude>**/*.min.js</exclude> </excludes> </configuration> <goals> <goal>minify</goal> </goals> </execution> </executions> </plugin> <!-- ... --> </plugins> </build> <!-- ... --> </project>