Maven Publisher
Dependency :
compile ":maven-publisher:0.8.1"
Summary
A plugin that allows you to publish Grails applications and plugins to Maven repositories without needing to use Maven directly.
Installation
grails install-plugin maven-publisher
Description
Overview
This plugin has been superseded by the release plugin and is no longer maintained. The release plugin provides the same features (and more) and is installed by default in Grails 2.0 and above applicationsThis plugin provides the ability to publish Grails projects and plugins to a local and remote Maven repositories. There are two key additional targets added by the plugin:
- maven-install - Installs a Grails project or plugin into your local Maven cache
- maven-deploy - Deploys a Grails project or plugin to a remote Maven repository
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 the case of plugins, the plugin zip file will be deployed, whilst for application the application WAR file will be deployed.maven-install
Themaven-install command will install the Grails project or plugin artifact into your local Maven cache:grails maven-install
maven-deploy
Themaven-deploy command will deploy a Grails project or plugin into a remote Maven repository:grails maven-deploy
<distributionManagement> configuration within a pom.xml or that you specify the id of the remote repository to deploy to:grails maven-deploy --repository=myRepo
repository argument specifies the 'id' for the repository. You need to configure the details of the repository specified by this 'id' within your grails-app/conf/BuildConfig.groovy file or in your USER_HOMER/.grails/settings.groovy file:grails.project.dependency.distribution = {
localRepository = "/path/to/my/local"
remoteRepository(id:"myRepo", url:"http://myserver/path/to/repo")
}<remoteRepository id="myRepo" url="scp://localhost/www/repository"> <authentication username="..." privateKey="${user.home}/.ssh/id_dsa"/> </remoteRepository>
remoteRepository(id:"myRepo", url:"scp://localhost/www/repository") { authentication username:"...", privateKey:"${userHome}/.ssh/id_dsa" }
grails maven-deploy --repository=myRepo --protocol=webdav
- 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 Grails project conventions or plugin descriptor.Projects
For applications this plugin will use the Grails application name and version provided by Grails when generating thepom.xml file. To change the version you can run the set-version command:grails set-version 0.2
groupId will be the same as the project name, unless you specify a different one in Config.groovy:grails.project.groupId="com.mycompany"Plugins
With a Grails plugin thegroupId and version are taken from the following properties in the *GrailsPlugin.groovy descriptor:String groupId = 'myOrg' String version = '0.1'
FeedsGrailsPlugin the artifactId will be "feeds". If your plugin does not specify a groupId then this defaults to "org.grails.plugins".