Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save douglascrp/5feeb78e76866464418bff27259049f8 to your computer and use it in GitHub Desktop.
Save douglascrp/5feeb78e76866464418bff27259049f8 to your computer and use it in GitHub Desktop.
How to add the missing minification of javascript files in Alfresco SDK 3.0
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<id>compress-assembly</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<!-- select only the directory you want to compress -->
<sourceDirectory>${project.basedir}/src/main/assembly/web</sourceDirectory>
<!-- and send it to the right output directory -->
<outputDirectory>${project.basedir}/src/main/assembly/web</outputDirectory>
<excludes>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/META-INF/**</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
</configuration>
</execution>
<execution>
<id>compress-resources</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<!-- select only the directory you want to compress -->
<sourceDirectory>${project.basedir}/src/main/resources</sourceDirectory>
<!-- and send it to the right output directory -->
<outputDirectory>${project.basedir}/src/main/resources</outputDirectory>
<excludes>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment