mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-05-26 17:25:11 +00:00
255 - Archetypes - Add JS minification
Modify the pom.xml files of the archetypes to include the yuicompressor-maven-plugin in order to configure the minification of the JS files.
This commit is contained in:
parent
e8976addea
commit
93c28f5dde
@ -336,6 +336,56 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Compress JavaScript files and store as *-min.js -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>net.alchim31.maven</groupId>
|
||||||
|
<artifactId>yuicompressor-maven-plugin</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
<executions>
|
||||||
|
<!-- Compress the JS files under the assembly folder -->
|
||||||
|
<execution>
|
||||||
|
<id>compress-assembly</id>
|
||||||
|
<goals>
|
||||||
|
<goal>compress</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sourceDirectory>${project.basedir}/src/main/assembly/web</sourceDirectory>
|
||||||
|
<outputDirectory>${project.basedir}/src/main/assembly/web</outputDirectory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/webscripts/**</exclude>
|
||||||
|
<exclude>**/site-webscripts/**</exclude>
|
||||||
|
<exclude>**/META-INF/**</exclude>
|
||||||
|
<exclude>**/*.lib.js</exclude>
|
||||||
|
<exclude>**/*.css</exclude>
|
||||||
|
<exclude>**/*-min.js</exclude>
|
||||||
|
<exclude>**/*-min.css</exclude>
|
||||||
|
</excludes>
|
||||||
|
<force>true</force>
|
||||||
|
<jswarn>false</jswarn>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<!-- Compress the JS files under the resources folder -->
|
||||||
|
<execution>
|
||||||
|
<id>compress-resources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>compress</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/webscripts/**</exclude>
|
||||||
|
<exclude>**/site-webscripts/**</exclude>
|
||||||
|
<exclude>**/*.lib.js</exclude>
|
||||||
|
<exclude>**/*.css</exclude>
|
||||||
|
<exclude>**/*-min.js</exclude>
|
||||||
|
<exclude>**/*-min.css</exclude>
|
||||||
|
</excludes>
|
||||||
|
<force>true</force>
|
||||||
|
<jswarn>false</jswarn>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<!-- Hot reloading with JRebel -->
|
<!-- Hot reloading with JRebel -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.zeroturnaround</groupId>
|
<groupId>org.zeroturnaround</groupId>
|
||||||
|
@ -162,6 +162,56 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Compress JavaScript files and store as *-min.js -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>net.alchim31.maven</groupId>
|
||||||
|
<artifactId>yuicompressor-maven-plugin</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
<executions>
|
||||||
|
<!-- Compress the JS files under the assembly folder -->
|
||||||
|
<execution>
|
||||||
|
<id>compress-assembly</id>
|
||||||
|
<goals>
|
||||||
|
<goal>compress</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sourceDirectory>${project.basedir}/src/main/assembly/web</sourceDirectory>
|
||||||
|
<outputDirectory>${project.basedir}/src/main/assembly/web</outputDirectory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/webscripts/**</exclude>
|
||||||
|
<exclude>**/site-webscripts/**</exclude>
|
||||||
|
<exclude>**/META-INF/**</exclude>
|
||||||
|
<exclude>**/*.lib.js</exclude>
|
||||||
|
<exclude>**/*.css</exclude>
|
||||||
|
<exclude>**/*-min.js</exclude>
|
||||||
|
<exclude>**/*-min.css</exclude>
|
||||||
|
</excludes>
|
||||||
|
<force>true</force>
|
||||||
|
<jswarn>false</jswarn>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<!-- Compress the JS files under the resources folder -->
|
||||||
|
<execution>
|
||||||
|
<id>compress-resources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>compress</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/webscripts/**</exclude>
|
||||||
|
<exclude>**/site-webscripts/**</exclude>
|
||||||
|
<exclude>**/*.lib.js</exclude>
|
||||||
|
<exclude>**/*.css</exclude>
|
||||||
|
<exclude>**/*-min.js</exclude>
|
||||||
|
<exclude>**/*-min.css</exclude>
|
||||||
|
</excludes>
|
||||||
|
<force>true</force>
|
||||||
|
<jswarn>false</jswarn>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Build an AMP if 3rd party libs are needed by the extensions
|
Build an AMP if 3rd party libs are needed by the extensions
|
||||||
JARs are the default artifact produced in your modules, if you want to build an amp for each module
|
JARs are the default artifact produced in your modules, if you want to build an amp for each module
|
||||||
|
@ -95,6 +95,56 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Compress JavaScript files and store as *-min.js -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>net.alchim31.maven</groupId>
|
||||||
|
<artifactId>yuicompressor-maven-plugin</artifactId>
|
||||||
|
<version>1.5.1</version>
|
||||||
|
<executions>
|
||||||
|
<!-- Compress the JS files under the assembly folder -->
|
||||||
|
<execution>
|
||||||
|
<id>compress-assembly</id>
|
||||||
|
<goals>
|
||||||
|
<goal>compress</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sourceDirectory>${project.basedir}/src/main/assembly/web</sourceDirectory>
|
||||||
|
<outputDirectory>${project.basedir}/src/main/assembly/web</outputDirectory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/webscripts/**</exclude>
|
||||||
|
<exclude>**/site-webscripts/**</exclude>
|
||||||
|
<exclude>**/META-INF/**</exclude>
|
||||||
|
<exclude>**/*.lib.js</exclude>
|
||||||
|
<exclude>**/*.css</exclude>
|
||||||
|
<exclude>**/*-min.js</exclude>
|
||||||
|
<exclude>**/*-min.css</exclude>
|
||||||
|
</excludes>
|
||||||
|
<force>true</force>
|
||||||
|
<jswarn>false</jswarn>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<!-- Compress the JS files under the resources folder -->
|
||||||
|
<execution>
|
||||||
|
<id>compress-resources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>compress</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>**/webscripts/**</exclude>
|
||||||
|
<exclude>**/site-webscripts/**</exclude>
|
||||||
|
<exclude>**/*.lib.js</exclude>
|
||||||
|
<exclude>**/*.css</exclude>
|
||||||
|
<exclude>**/*-min.js</exclude>
|
||||||
|
<exclude>**/*-min.css</exclude>
|
||||||
|
</excludes>
|
||||||
|
<force>true</force>
|
||||||
|
<jswarn>false</jswarn>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<!-- Build an AMP if 3rd party libs are needed by the extension -->
|
<!-- Build an AMP if 3rd party libs are needed by the extension -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user