Skip to content

Commit 1181d6d

Browse files
committed
Signed-off-by: pizzi80 <[email protected]>
Maven - Removed yuicompressor (dead project with no support for ES6+ js) + Added Google Closure maven plugin for minification Faces JS + tested and minified with ECMASCRIPT5_STRICT profile of Google Closure + use strict + const and let instead of var - Removed IE-5-6-7-8-9-10 support - Removed IE 5-6-7 hacks and memory hacks - Removed FrameTransport - Removed / Commented out unused and very old functions and code + FormData for File upload + Many minor optimizations + for..of instead of for with index + Partial Submit ported and adapted from OmniFaces + 10 kB Minified and Gzipped Signed-off-by: pizzi80 <[email protected]>
1 parent cb1a526 commit 1181d6d

File tree

6 files changed

+805
-1416
lines changed

6 files changed

+805
-1416
lines changed

action/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.glassfish</groupId>
2424
<artifactId>mojarra-parent</artifactId>
25-
<version>4.0.1-SNAPSHOT</version>
25+
<version>4.0.0-SNAPSHOT</version>
2626
</parent>
2727

2828
<groupId>org.eclipse.mojarra</groupId>

cdi/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.glassfish</groupId>
2424
<artifactId>mojarra-parent</artifactId>
25-
<version>4.0.1-SNAPSHOT</version>
25+
<version>4.0.0-SNAPSHOT</version>
2626
</parent>
2727

2828
<groupId>org.eclipse.mojarra</groupId>

impl/pom.xml

Lines changed: 18 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<parent>
3030
<groupId>org.glassfish</groupId>
3131
<artifactId>mojarra-parent</artifactId>
32-
<version>4.0.1-SNAPSHOT</version>
32+
<version>4.0.0-SNAPSHOT</version>
3333
</parent>
3434

3535
<artifactId>jakarta.faces</artifactId>
@@ -207,65 +207,37 @@
207207
</resources>
208208
<pluginManagement>
209209
<plugins>
210-
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
211-
<plugin>
212-
<groupId>org.eclipse.m2e</groupId>
213-
<artifactId>lifecycle-mapping</artifactId>
214-
<version>1.0.0</version>
215-
<configuration>
216-
<lifecycleMappingMetadata>
217-
<pluginExecutions>
218-
<pluginExecution>
219-
<pluginExecutionFilter>
220-
<groupId>net.alchim31.maven</groupId>
221-
<artifactId>yuicompressor-maven-plugin</artifactId>
222-
<versionRange>[1.5,)</versionRange>
223-
<goals>
224-
<goal>compress</goal>
225-
</goals>
226-
</pluginExecutionFilter>
227-
<action>
228-
<execute>
229-
<runOnIncremental>false</runOnIncremental>
230-
</execute>
231-
</action>
232-
</pluginExecution>
233-
</pluginExecutions>
234-
</lifecycleMappingMetadata>
235-
</configuration>
236-
</plugin>
237210
</plugins>
238211
</pluginManagement>
239212
<plugins>
240213

241214
<!-- ### C O M P R E S S / M I N I F Y faces.js ### -->
215+
<!-- https://blutorange.github.io/closure-compiler-maven-plugin/minify-mojo.html -->
242216
<plugin>
243-
<groupId>net.alchim31.maven</groupId>
244-
<artifactId>yuicompressor-maven-plugin</artifactId>
245-
<version>1.5.1</version>
217+
<groupId>com.github.blutorange</groupId>
218+
<artifactId>closure-compiler-maven-plugin</artifactId>
219+
<version>2.23.0</version>
246220
<executions>
221+
<!-- Process all files in the "includes" directory individually-->
247222
<execution>
248223
<id>minify-faces-js</id>
249224
<phase>generate-sources</phase>
250225
<goals>
251-
<goal>compress</goal>
226+
<goal>minify</goal>
252227
</goals>
253228
<configuration>
254-
<nosuffix>true</nosuffix>
255-
<preProcessAggregates>true</preProcessAggregates>
256-
<aggregations>
257-
<aggregation>
258-
<includes>
259-
<include>${project.basedir}/src/main/resources/META-INF/resources/jakarta.faces/faces-uncompressed.js</include>
260-
</includes>
261-
<output>${project.build.directory}/generated-resources/yui/faces.js</output>
262-
</aggregation>
263-
</aggregations>
229+
<encoding>UTF-8</encoding>
230+
<!-- Base configuration for all executions (bundles) -->
231+
<baseSourceDir>${project.basedir}/src/main/resources/META-INF/resources/</baseSourceDir>
232+
<baseTargetDir>${project.build.directory}/generated-resources/minified/META-INF/resources/</baseTargetDir>
233+
<sourceDir>jakarta.faces</sourceDir>
234+
<targetDir>jakarta.faces</targetDir>
264235
<includes>
265-
<include>*.js</include>
236+
<include>faces-uncompressed.js</include>
266237
</includes>
267-
<sourceDirectory>${project.build.directory}/generated-resources/yui</sourceDirectory>
268-
<outputDirectory>${project.build.directory}/generated-resources/yui/META-INF/resources/jakarta.faces/</outputDirectory>
238+
<outputFilename>#{path}/faces.js</outputFilename>
239+
<skipMerge>true</skipMerge>
240+
<closureLanguageOut>ECMASCRIPT5_STRICT</closureLanguageOut>
269241
</configuration>
270242
</execution>
271243
</executions>
@@ -287,7 +259,7 @@
287259
<configuration>
288260
<resources>
289261
<resource>
290-
<directory>${project.build.directory}/generated-resources/yui</directory>
262+
<directory>${project.build.directory}/generated-resources/minified</directory>
291263
</resource>
292264
</resources>
293265
</configuration>

0 commit comments

Comments
 (0)