Search code examples
jqueryangularjsspring-bootbowerwebjars

Incorrect webjar version is being downloaded


We have configured AngularJS application with spring boot using gradle. For downloading libraries, webjars are being used. Incase of jquery, we have defined version as 3.2.1. But, when the gradle is built, jquery version 3.3.1 gets downloaded.

   compile group: 'org.webjars.bower', name: 'jquery' , version:'3.2.1'

Screenshot of libraries downloaded

As the index.html looks for <script src="/webjars/jquery/3.2.1/dist/jquery.js"></script> which is not available, it does not load bootstrap libraries as well.

But if we use compile 'org.webjars:jquery:3.0.0' instead of org.webjars.bower, it does not downloads the latest library, just the version specified.

It this behavior because of bower? Or is there any other configuration to be done in gradle?


Solution

  • webjars-locator can be used to manage dependencies