Skip to content

Instantly share code, notes, and snippets.

@jamesfalkner
Last active April 19, 2016 14:46
Show Gist options
  • Save jamesfalkner/95c195cff8c072cbd8b6107b57275e3a to your computer and use it in GitHub Desktop.
Save jamesfalkner/95c195cff8c072cbd8b6107b57275e3a to your computer and use it in GitHub Desktop.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>exec-npm-install</id>
<phase>generate-sources</phase>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
<execution>
<id>exec-bower-install</id>
<phase>generate-sources</phase>
<configuration>
<executable>bower</executable>
<arguments>
<argument>--allow-root</argument>
<argument>install</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<failOnWarning>true</failOnWarning>
<outputDirectory>target/${project.artifactId}/js/</outputDirectory>
<nosuffix>true</nosuffix>
<excludes>
<exclude>imgs/**</exclude>
<exclude>**/js/**/*js</exclude>
<exclude>vendor/**</exclude>
<exclude>**/*min.css</exclude>
<exclude>**/*min.js</exclude>
</excludes>
</configuration>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment