Gradle boot and cahces dependecies locally. It refers to artifacts from the cache, when necessary, IDE, all compilers get the path to the artifact from the cache. The link that you are in includes a file from the archive in the cache. This is not what the browser understands.
You need to use the Copy task to place it somewhere in your project, where you can access it, or pack it along with the rest of your site. Copying a specific dependency has already been considered . You will need to additionally extract the artifact. The documentation has examples of how to read the contents of the archive .
Here's what a complete solution might look like:
apply plugin: "java" repositories { mavenCentral() } dependencies { compile group: 'org.webjars', name: 'bootstrap', version: '3.3.7' } task copyBootstrap(type: Copy) { configurations.compile .files({ it.group.equals("org.webjars")}) .each { from zipTree(it) } into "$buildDir/static_resources" }
This puts the file you are looking for in the following location on my system (Gradle 2.14.1):
build/static_resources/META-INF/resources/webjars/bootstrap/3.3.7/css/bootstrap.min.css
If you want to extract a specific file or get rid of the version number, to simplify access to what is also possible .
Please note that in $buildDir it is recommended to extract it, because with most plugins, including java, it is automatically cleared using the "Clear" task, and it is more difficult to do this by accident.
Alpar source share