Skip to content

Instantly share code, notes, and snippets.

@grofoli
Created February 1, 2014 14:12
Show Gist options
  • Save grofoli/8752882 to your computer and use it in GitHub Desktop.
Save grofoli/8752882 to your computer and use it in GitHub Desktop.
Sample usage of yuicompressor-maven.plugin
<!-- Plugin git repo: https://github.com/davidB/yuicompressor-maven-plugin. -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.3.3</version>
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<nosuffix>true</nosuffix>
<excludes>
<exclude>jquery-1.10.2.js</exclude>
</excludes>
<aggregations>
<aggregation>
<!-- remove files after aggregation (default: false)
<removeIncluded>true</removeIncluded>
-->
<!-- insert new line after each concatenation (default: false) -->
<insertNewLine>true</insertNewLine>
<output>${project.build.directory}/all.js</output>
<!-- files to include, path relative to output's directory or absolute path-->
<!--inputDir>base directory for non absolute includes, default to parent dir of output</inputDir-->
<includes>
<!-- <include>${basedir}/src/licenses/license.js</include> -->
<include>**/*.js</include>
</includes>
<excludes>
<exclude>jquery-1.10.2.js</exclude>
</excludes>
<!-- files to exclude, path relative to output's directory
<excludes>
<exclude>**/*.pack.js</exclude>
<exclude>**/compressed.css</exclude>
</excludes>
-->
</aggregation>
</aggregations>
</configuration>
</plugin>
@grofoli
Copy link
Author

grofoli commented Feb 1, 2014

finds all js files automatically and creates all.js in target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment