Skip to content
Webjars-locator core functionality
Java JavaScript
Branch: master
Clone or download
This branch is 1 commit ahead, 51 commits behind webjars:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE.md
README.md
pom.xml

README.md

webjars-locator-core

This project provides a means to locate assets within WebJars.

Check out the JavaDoc

Build Status Latest Release

Obtain the full path of an asset

Find the specified partial path in any WebJar on the classpath:

WebJarAssetLocator locator = new WebJarAssetLocator();
String fullPathToBootstrap = locator.getFullPath("bootstrap.js");

Find the specified partial path in a specific WebJar:

WebJarAssetLocator locator = new WebJarAssetLocator();
String fullPathToBootstrap = locator.getFullPath("bootstrap", "bootstrap.js");

Get the full path to a file in a specific WebJar:

WebJarAssetLocator locator = new WebJarAssetLocator();
String fullPathToBootstrap = locator.getFullPathExact("bootstrap", "js/bootstrap.js");

Obtain all of the assets within a base folder

WebJarAssetLocator locator = new WebJarAssetLocator();
Set<String> fullPathsOfAssets = locator.listAssets("/multiple/1.0.0");

Advanced usage

The locator can also be configured with the class loaders that it should use for looking up resources and filter the types of resources that should be included for searching. Please visit the source code for more information.

You can’t perform that action at this time.