Closed solomax closed 1 year ago
cc @VsevolodGolovanov looks like this broke with this change: https://github.com/primefaces-extensions/resources-optimizer-maven-plugin/issues/130
Hmm I am using it in Quarkus Faces: https://github.com/melloware/quarkus-faces/blob/a539276df90b25a849c55dff1341cbcb6f0c9f49/pom.xml#L215
and it seems to work?
Hello @melloware,
I'm very new to this plugin, trying to replace yuicompressor-maven-plugin
with this one for Apache Wicket project
I've created very basic config:
<plugin>
<groupId>org.primefaces.extensions</groupId>
<artifactId>resources-optimizer-maven-plugin</artifactId>
<version>${resources-optimizer-maven-plugin.version}</version>
<configuration>
<suffix>.min</suffix>
<inputDir>${project.build.directory}/classes</inputDir>
<useDataUri>false</useDataUri>
<resourcesSets>
<resourcesSet>
<excludes>
<exclude>**/jquery*.js</exclude>
</excludes>
</resourcesSet>
</resourcesSets>
</configuration>
<executions>
<execution>
<goals>
<goal>optimize</goal>
</goals>
</execution>
</executions>
</plugin>
And was surprised with following lines in the log:
[INFO] Optimize CSS file theme.css ...
[INFO] Data URI conversion for: /home/solomax/work/wicket/wicket/wicket-extensions/target/classes/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/tree.gif
[INFO] Data URI conversion for: /home/solomax/work/wicket/wicket/wicket-extensions/target/classes/org/apache/wicket/extensions/markup/html/repeater/tree/theme/human/tree-rtl.gif
..............................
[INFO] === Statistic ===========================================
[INFO] Size before optimization = 109.604 KB
[INFO] Size after optimization = 112.353 KB
[INFO] Optimized resources have 102.51% of original size
[INFO] =========================================================
With 2.4.1
and same config I got much better results:
[INFO] === Statistic ===========================================
[INFO] Size before optimization = 109.604 KB
[INFO] Size after optimization = 49.72 KB
[INFO] Optimized resources have 45.36% of original size
[INFO] =========================================================
The real code is available here: https://github.com/apache/wicket/pull/602 :)
Definitely a bug that should not happen and the behavior in was correct in 2.4.1. Has to be the recent changes. Let me take a deeper look.
OK fixed it and let me push a 2.6.1 to Maven Central.
OK 2.6.1 is is Maven Central give it a shot and report back!
It was fast :))))
Thanks a lot! With version 2.6.1. everything works as expected!
Describe the bug
Not sure if this is correct place for
resources-optimizer-maven-plugin
The configuration like this:
has no effect for version
2.6.0
(works as expected for2.4.1
Reproducer
Steps:
Expected behavior
images should remain external
PrimeFaces Extensions version
2.6.0
JSF implementation
None
JSF version
No response
Browser(s)
No response