Hi Maxim, Thank you for taking a look!
I have created an issue for this: https://issues.apache.org/jira/browse/WICKET-7166 This is indeed what fixes it, and this exact change was made to Wicket 10.0.0 just before release. But, as I wrote in my issue, nobody was aware that the minified js was missing from wicket-core it seems. It looks like a relatively straightforward fix, so I have cherry picked the relevant 2 commits and created a pull request: https://github.com/apache/wicket/pull/1278 Met vriendelijke groet, Kind regards, Bas Gooren Op 15 okt 2025, 04:25:14 schreef Maxim Solodovnik <[email protected]>: > Hello Bas Gooren, > > On Tue, 14 Oct 2025 at 16:34, Bas Gooren <[email protected]> wrote: > > > 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? > > > I was able to reproduce this one > > After comparing pom files with master branch I was able to fix the > issue with the following patch: > > =================================================================== > diff --git a/pom.xml b/pom.xml > index 730d253455..858ee82091 100644 > --- a/pom.xml > +++ b/pom.xml > @@ -885,9 +885,9 @@ > <executions> > <execution> > > <id>default-bundle</id> > - > <phase>package</phase> > + > <phase>process-classes</phase> > <goals> > - > <goal>bundle</goal> > + > <goal>manifest</goal> > </goals> > <configuration> > > <instructions> > diff --git a/wicket-core/pom.xml b/wicket-core/pom.xml > index f889a95ccb..e7f4b07366 100644 > --- a/wicket-core/pom.xml > +++ b/wicket-core/pom.xml > @@ -24,7 +24,7 @@ > <relativePath>../pom.xml</relativePath> > </parent> > <artifactId>wicket-core</artifactId> > - <packaging>bundle</packaging> > + <packaging>jar</packaging> > <name>Wicket Core</name> > <description> > Wicket is a Java web application framework that takes > simplicity, > > =================================================================== > > I'm not an expert in bundle-plugin so not sure if above changes are correct > > > > 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 > > > > > > > > -- > Best regards, > Maxim > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
