Skip to end of metadata
Go to start of metadata

Description

This plugin provides the ability to publish Grails projects and plugins to a local and remote Maven repositories. This is a direct port of the Grails Maven Publisher plugin orginally made by Graeme Rocher.

Installation

The current version of griffon-maven-publisher-plugin is 0.1
To install just issue the following command

Usage

By default this plugin will automatically generate a valid pom.xml for you unless a pom.xml is already present in the root of the project, in which case this pom.xml file will be used.

In both cases (plugins and applications), a zip file will be deployed.

Scripts

  • maven-install - Installs a Griffon project or plugin into your local Maven cache
  • maven-deploy - Deploys a Griffon project or plugin to a remote Maven repository

It is assumed that you have specified the necessary <distributionManagement> configuration within a pom.xml or that you specify the id of the remote repository to deploy to:

The repository argument specifies the 'id' for the repository. You need to configure the details of the repository specified by this 'id' within your griffon-app/conf/BuildConfig.groovy file or in your USER_HOMER/.griffon/settings.groovy file:

The syntax for configuring remote repositories matches the syntax from the remoteRepository element in the Ant Maven tasks. For example the following XML:

Can be expressed as:

By default the plugin will try to detect the protocol to use from the URL of the repository (ie "http" from "http://.." etc.), however if you need to explicitly specify a different protocol you can do:

The available protocols are:

  • http
  • scp
  • scpexe
  • ftp
  • webdav

Groups, Artifacts and Versions

Maven defines the notion of a 'groupId', 'artifactId' and a 'version'. This plugin pulls this information from the Griffon project conventions or plugin descriptor.

Projects

For applications this plugin will use the Griffon application name and version provided by Griffon when generating the pom.xml file. To change the version you can run the set-version command:

The Maven groupId will be the same as the project name, unless you specify a different one in BuilderConfig.groovy:

Plugins

With a Griffon plugin the groupId and version are taken from the following properties in the *GriffonPlugin.groovy descriptor:

The 'artifactId' is taken from the plugin name. For example if you have a plugin called FooGriffonPlugin the artifactId will be "foo". If your plugin does not specify a groupId then this defaults to "org.codehaus.griffon.plugins".

History

Version

Date

Notes

0.1

07-22-10

first release

  • No labels