Unverified Commit b366ae3d authored by Ole Hejlskov's avatar Ole Hejlskov Committed by GitHub
Browse files

Merge pull request #530 from Alfresco/bug/255

BUGFIX - 255 - Archetypes - Add JS minification
parents 19369a23 93c28f5d
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
@@ -336,6 +336,56 @@
                </configuration>
            </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 -->
            <plugin>
                <groupId>org.zeroturnaround</groupId>
+50 −0
Original line number Diff line number Diff line
@@ -162,6 +162,56 @@
                </configuration>
            </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
                JARs are the default artifact produced in your modules, if you want to build an amp for each module
+50 −0
Original line number Diff line number Diff line
@@ -95,6 +95,56 @@
                </configuration>
            </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 -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>