grunt-mvn-deploy

0.5.5 • Public • Published

grunt-mvn-deploy

Deploy node projects to Maven.

Getting Started

This plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-mvn-deploy --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-mvn-deploy');

The "mvn_deploy" task

Overview

In your project's Gruntfile, add a section named mvn_deploy to the data object passed into grunt.initConfig().

grunt.initConfig({
  mvn: {
    options: {
      debug: true // Optional boolean
    },
    package: {
      groupId: "com.example",
      artifactId: "project",
      sources: ["dist/**"],
      version: "6.6.6"
    },
    snapshot: {
      url: "http://maven.example.com/snapshots",
      id: "example-snaps"
    },
    release: {
      url: "http://maven.example.com/releases",
      id: "example-releases"
    }
  }
})

Options

options.debug

Type: Boolean
Default: false

Whether or not the --debug flag should be passed to maven.

package.groupId

Type: String
Required

Maven groupId, e.g. com.yourcompany.

package.artifactId

Type: String Default: name field in package.json

Name of artifact to publish. This field will default to the name field in package.json.

package.sources

Type: Array Required

A list of glob-compatible paths to include in the package.

package.version

Type: String Default: version field in package.json

The version of the artifact to publish. This field will default to the version field in package.json.

If publishing to a snapshot respository -SNAPSHOT will automatically be appended.

snapshot.url

Type: String Required

URL to your snapshots repository

snapshot.id

Type: String Optional

The id of the snapshot repository if it is defined in your settings.xml file. This option is useful if your repository requires authentication.

release.url

Type: String Required

URL to your snapshots repository

release.id

Type: String Optional

The id of the snapshot repository if it is defined in your settings.xml file. This option is useful if your repository requires authentication.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

0.5.5

  • Updated documentation

  • Added "mvn" and "maven" keywords to package file.

0.5.1

  • Removed unused semver dependency

  • Replaced adm-zip with mozie-zip.

0.5.0

Initial release.

Dependents (0)

Package Sidebar

Install

npm i grunt-mvn-deploy

Weekly Downloads

4

Version

0.5.5

License

none

Last publish

Collaborators

  • ryanaghdam