Hi All,

I just cloned the GitHub repo and ran “mvn package -Dmaven.test.skip
-Dmaven.javadoc.skip=true” for the wicket-9.x branch.

I see that it runs JS and CSS minification for wicket-core:

[INFO] Optimize CSS file pageview.css ...
[INFO] Optimize CSS file error.css ...
[INFO] Optimize JS file wicket-ajax-jquery.js ...
[INFO] Optimize JS file CheckSelector.js ...
[INFO] Optimize JS file FilesSelectedBehavior.js ...
[INFO] Optimize JS file MultiFileUploadField.js ...
[INFO] Optimize JS file FileUploadToResourceField.js ...
[INFO] Optimize JS file wicket-browser-info.js …

I also see wicket-ajax-jquery.min.js (and the other minified files) in the
target folder.
The packaged jar contains the minified JS files, except for the minified
wicket-ajax-jquery.min.js file.

So minification seems to work; But as I mentioned before, the 9.21
wicket-core artifact deployed to maven central only
contains wicket-ajax-jquery.js in the org/apache/wicket/ajax/res/js folder.

It looks like the minified wicket-ajax-jquery.js doesn’t make it into the
(deployed) artifact.

The strange thing is that the other minified files *are* present in the jar
(I ran this after unzipping the wicket-core jar):

% find . -name "*.js" | sort
./org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
./org/apache/wicket/markup/html/form/CheckSelector.js
./org/apache/wicket/markup/html/form/CheckSelector.min.js
./org/apache/wicket/markup/html/form/upload/FilesSelectedBehavior.js
./org/apache/wicket/markup/html/form/upload/FilesSelectedBehavior.min.js
./org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js
./org/apache/wicket/markup/html/form/upload/MultiFileUploadField.min.js
./org/apache/wicket/markup/html/form/upload/resource/FileUploadToResourceField.js
./org/apache/wicket/markup/html/form/upload/resource/FileUploadToResourceField.min.js
./org/apache/wicket/markup/html/pages/wicket-browser-info.js
./org/apache/wicket/markup/html/pages/wicket-browser-info.min.js
./org/apache/wicket/resource/jquery/jquery-1.12.4.js
./org/apache/wicket/resource/jquery/jquery-1.12.4.min.js
./org/apache/wicket/resource/jquery/jquery-2.2.4.js
./org/apache/wicket/resource/jquery/jquery-2.2.4.min.js
./org/apache/wicket/resource/jquery/jquery-3.7.1.js
./org/apache/wicket/resource/jquery/jquery-3.7.1.min.js

There doesn’t seem to be any rules in the parent pom.xml or wicket-core
pom.xml which are excluding this particular file.

Alas even a build with debug output (-X, so "mvn clean package -pl
wicket-core -am -Dmaven.test.skip -Dmaven.javadoc.skip -Dmaven.source.skip
-X”) reveals why this is happening…

Does anybody else have a clue why only that particular min.js file is
excluded in the packaging step?

Met vriendelijke groet,
Kind regards,

Bas Gooren


Op 12 okt 2025, 22:44:57 schreef Bas Gooren <[email protected]>:

> Hi all,
>
> For one of our projects we have been optimizing all of our resources (css,
> js).
>
> However, some of our tools complain that the wicket js files are not
> minified.
> So I checked and see that this is true.
>
> In production we see that the standard wicket javascript compressor is
> used, which does not do much (it pretty much looks like tabs and some
> newlines are stripped). So the non-minified js is loaded and “compressed”
> once in after startup.
>
> The maven plugin resources-optimizer-maven-plugin is loaded for this in
> the pom.xml, but it seems that it is not outputting anything.
>
> When I browse the wicket-core maven artifact we use (9.21.0), I only see
> the original wicket-ajax-jquery.js in it, no wicket-ajax-jquery.min.js;
> So it looks like the maven plugin is not minifying the framework js.
>
> I’ll see if I can have a look myself why the maven plugin is not working
> properly - but wanted to flag this already in the meantime.
>
> Met vriendelijke groet,
> Kind regards,
>
> Bas Gooren
>

Reply via email to