Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Gaelyk Resources Plugin
Groovy Shell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
gradle/wrapper
src
.gitignore
README.md
build.gradle
codenarc.groovy
gradlew
gradlew.bat

README.md

Gaelyk Resources Plugin

Gaelyk Resources Plugin serves static resources packed inside Gaelyk's binary plugins.

Installation

The plugin is distributed using Maven Central as org.gaelyk:gaelyk-resources:1.1. To install the plugin declare it as compile dependency in the Gradle build file.

  dependencies {
     ...
     compile 'org.gaelyk:gaelyk-resources:1.1'
     ...
  }

Accessing plugin files

Any files packed in resources folder of JARed binary plugin are served under /gpr/<resourcePath> URL of your application. If you have binary plugin with following structure

+ myPlugin.jar
  |
  + resources
    |
    + folder
      |
      + resource.xyz

the resource resource.xyz will be available for the application on

/gpr/folder/resource.xyz

Caching

Resources are send with Last-Modified header with the time stamp of the original JARed file (e.g. the build time stamp) for better browser caching. If If-Modified-Since the plugin responds NOT MODIFIED until the timestamp of the JARed file changes e.g. due updated dependency.

MIME types

MIME type is derived using utility class MimeTypes. The class still needs some polishing. Feel free to contribute new MIME type or suggest the right MIME type for particular extension. You can do this directly from the GitHub interface using Edit this File button.

Something went wrong with that request. Please try again.