Skip to content

Installation Instructions

Noam Y. Tenne edited this page · 11 revisions

Prerequisites

Using the grails-jaxrs plugin requires a Grails 1.1.1 (or higher) installation. For instructions how to download and install Grails refer to the Grails reference documentation. The following table shows which grails-jaxrs version to use for which Grails version

Grails version grails-jaxrs version
2.4.x 0.11
2.3.x 0.10
2.1.x to 2.2.x 0.9
2.2.1 or higher 0.8
2.1.1 or higher 0.7
2.0.0 or higher 0.6
A note for ALL USERS users of the Restlet implementation

To properly resolve all the dependencies required by Restlet, you may have to add the following repository to your project's BuildConfig.groovy:

mavenRepo 'http://maven.restlet.org/'

This is temporarily needed until we find a proper way to declare optional dependencies. See issue #16.

Getting the plugin

Note: If you want to install the plugin directly from the Grails Plugin Repository you can skip this section and go directly to the section Installing the plugin.

Sources

If you want to build the plugin from its sources clone the grails-jaxrs repository with

git clone git://github.com/krasserm/grails-jaxrs.git

and change to the created grails-jaxrs directory. Optionally, run the unit and integration tests by entering

grails test-app

on the command line. To create a binary package of the plugin enter

grails package-plugin

The filename of the created plugin is grails-jaxrs-<version>.zip where <version> is the current development version. To build older versions of the plugin from its sources use one of the grails-jaxrs tags.

Installing the plugin

If you want to use the grails-jaxrs plugin in a Grails application you need to install it first. The plugin can be either be installed directly from the Grails plugin repository or from a local package that has been download before or built from the sources.

From the Grails plugin repository

Plugin version 0.8 and above

Add the plugin dependency declaration to your project's BuildConfig.groovy ($PROJECT_DIR/grails-app/conf/BuildConfig.groovy)

grails.project.dependency.resolution = {
    plugins {
        compile ':jaxrs:$VERSION'
    }
}

Then go to your project's root directory and enter

grails refresh-dependencies

Plugin version 0.7 and below

Go to your project's root directory and enter

grails install-plugin jaxrs $VERSION

From a local plugin binary

Plugin version 0.8 and above

Version 0.8 and above are distributed with a POM file in addition to the plugin zip distribution; the POM file is required for correct resolution of the plugin's dependencies.

When building the plugin from source

From the grails-jaxrs directory run

grails maven-install

To install the plugin to your local Maven cache then add the plugin's dependency declaration to your project's BuildConfig.groovy descriptor

When installing for a ready distribution

Install the plugin to your local Maven cache in the following coordinates:

%USER_HOME/.m2/repository/org/grails/plugins/jaxrs/%VERSION/jaxrs-$VERSION.zip
%USER_HOME/.m2/repository/org/grails/plugins/jaxrs/%VERSION/jaxrs-$VERSION.pom

And add the plugin's dependency declaration to your project's BuildConfig.groovy descriptor

Plugin version 0.7 and below

Go to your project's root directory and enter

grails install-plugin /path/to/grails-jaxrs-$VERSION.zip

where /path/to needs to be replaced by the absolute or relative path to the grails-jaxrs-$VERSION.zip file.

Something went wrong with that request. Please try again.