-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for additional npm locations considered? #13
Comments
Thanks for bring this up. A few thoughts... The Bower WebJars are deprecated and general support will be impossible without classpath scanning because the path can have anything, like: The Bower Original WebJars could be supported because their paths are like the NPM WebJars: Whatever we come up with for path customization could be used to add support for the Bower Original WebJars. So to support the additional locations, we could read a file from like: This could provide configurable locations but we will need to design that. Some considerations:
Any other ideas for how we can accomplish this? |
Sorry for the later response, I wanted to reply earlier, but last two days where... bad. After digging a bit more in the code of this new Locator and the old (core) one, i realized that our internal jars have even more "problems". My first thought was to be able configure the mappings manually. The locator provides an API to add additional search paths, and Spring Boot (in my case) could provide properties to configure those via Manually configuring the paths would bypass the potential precedence problem that could happen with detecting the On the other hand, would that require that every project that depends on a "non-standard" webjar would have to configure the paths. With a And if the file supports "configuring" multiple webjars, also the bower webjars could be supported/configured by the users project? The most basic file layout could be something like:
Depending on when the scan for the properties files happens, this still has some initial overhead, but the result could be cached and it is still faster than the old scannig in And with the currently implemented fallback based lookup, existing And coming back to the precedence problem once again, isnt this a potential problem already? When I am not mistaken, the |
Hello @jamesward, did you have any time to think about this issue and/or my last suggestion? If we can find a concept that works for you, i would try to implement it via a PR. Maybe we can get this done before Spring Boot 3.4 releases in November. so that they potentially upgrade thier management and the old and/or custom webjars do not get broken (or at least "easily" fixable). |
Hey @jamesward, I was about to update the readme to add some documentation for the The question is, do we/you care about support for legacy bowergithub jars? For me the main focus of this issue was to enable custom webjars, having the lucky side effect of supporting legacy "bower" jars in the same way. But if you say we should go the extra mile to also allow webjars that do not have a version part in the path, I am willing to give it a shot. Also, kind of offtopic for this issue but maybe something to look at: Due to the amount of change needed I wanted to assure that you want changes to support webjars without version part, before continuing. My opinion: While in theory it would be good to support the old stuff if not too much effort. I think it might not be as worthy as they are going to be unlisted from webjars.org in a few months and webjars-locator-core will still be available until one can upgrade the webjar usage. For now I will stick to updating the readme, but please let me hear your thoughts on this. :) |
Thanks for finding this and digging into it! I'm with you that if the amount of work were trivial, I'd say we add support for the bowergithub WebJars. But it sounds like that isn't the case. And the fallback to |
Okay. Let's wait and see. :) Regarding the |
Hello there,
with Spring Boot deprecating webjars-locator-core in 3.4 and considering to remove support in a later version I realized, that this new locator only considers
org.webjars
andorg.webjars.npm
withinMETA-INF/maven/
as valid webjar locations.Beside the fact, that we (afaik) still have some projects using
org.webjars.bower
that for sure should be replaced asap anyway, we also have some custom in-house webjars where thepom.properties
is located in a path likeMETA-INF/maven/our.domain/project/pom.properties
Now my question is: Is there any plan to add some kind of support of adding/configuring custom pathes for this lookup? Or do we have to migrate our webjars to use either
org.webjars
ororg.webjars.npm
?The text was updated successfully, but these errors were encountered: