You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sebastian Gooren (Jira)" <ji...@apache.org> on 2025/10/17 07:11:00 UTC

[jira] [Commented] (WICKET-7166) Minified wicket-ajax-jquery.js is not in wicket-core maven artifact

    [ https://issues.apache.org/jira/browse/WICKET-7166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18030546#comment-18030546 ] 

Sebastian Gooren commented on WICKET-7166:
------------------------------------------

I just cloned the GitHub repo and ran
{noformat}
mvn package -Dmaven.test.skip -Dmaven.javadoc.skip=true{noformat}
 for the wicket-9.x branch.
 
I see that it runs JS and CSS minification for wicket-core:
 
{noformat}
[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 …{noformat}
 
 
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):
 
{noformat}
% 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{noformat}
 
 
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 
{noformat}
mvn clean package -pl wicket-core -am -Dmaven.test.skip -Dmaven.javadoc.skip -Dmaven.source.skip -X{noformat}
) reveals why this is happening…

> Minified wicket-ajax-jquery.js is not in wicket-core maven artifact
> -------------------------------------------------------------------
>
>                 Key: WICKET-7166
>                 URL: https://issues.apache.org/jira/browse/WICKET-7166
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 9.21.0
>            Reporter: Sebastian Gooren
>            Priority: Minor
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)