We are using webjars with maven in our project. So we have hundreds of JSPs with code like this:
<%--JSP CODE--%>
<script src="<c:url value="/webjars/jquery/2.2.0/jquery.min.js" />" type="text/javascript"></script>
<script src="<c:url value="/webjars/bootstrap/3.3.6/js/bootstrap.min.js" />" type="text/javascript"></script>
.........
And as you can guess it's a cumbersome work to update to newer versions of webjars. So I'm looking for the solution which will allow me to import scripts like this:
<%--JSP CODE--%>
<script src="<c:url value="/webjars/jquery/jquery.min.js" />" type="text/javascript"></script>
<script src="<c:url value="/webjars/bootstrap/js/bootstrap.min.js" />" type="text/javascript"></script>
.........
Basically I want to remove a webjar version from url. Can you propose nice and simple solution for this problem?
So far I come up with resource servlet which can guess which file to return by the url. But this solution involves full resource scanning at the start of an application.