Giter Site home page Giter Site logo

ronaldtreur / grunt-nexus-deployer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from skhatri/grunt-nexus-deployer

0.0 1.0 0.0 41 KB

Nexus Artifact deployer from grunt against snapshot and release repositories.

License: MIT License

JavaScript 100.00%

grunt-nexus-deployer's Introduction

grunt-nexus-deployer

Nexus Artifact Deployer from grunt

Build Status NPM version Dependency Status

Getting Started

This plugin requires Grunt ~0.4.2

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-nexus-deployer --save-dev

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

grunt.loadNpmTasks('grunt-nexus-deployer');

Starter Project

Checkout starter project and test nexus publishing.

git clone [email protected]:skhatri/grunt-nexus-test.git
cd grunt-nexus-test
npm install
grunt nexusDeployer:snapshot

The "nexusDeployer" task

Overview

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

grunt.initConfig({
  nexusDeployer: {
    release: {
      options: {
		  groupId: "grunt-nexus-deployer",
		  artifactId: "grunt-nexus-deployer",
		  version: "1.0",
		  packaging: 'zip',
                  classifier: 'dev',
		  auth: {
			username:'admin',
			password:'admin123'
		  },
		  pomDir: 'build/pom',
		  url: 'http://localhost:9220/nexus/content/repositories/releases',
		  artifact: 'build/grunt-nexus-deployer.zip',
		  noproxy: 'localhost',
		  cwd: ''
		}
      }
    }
});

Options

options.groupId

Type: String Default value: ''

The group owning the artifact.

options.artifactId

Type: String Default value: ''

The artifact id of the artifact.

options.packaging

Type: String Default value: ''

Type of artifact. eg zip, jar, pom, war etc.

options.classifier

Type: String Defaut value: ''

An optional classifier that can further distinguish between artifacts of the same group, id and version. eg dev, prod etc. (i.e. artifact-1.0-dev.zip, artifact-1.0-prod.zip)

options.version

Type: String Default value: ''

Version of the artifact being uploaded. Ensure you have your versions ending with -SNAPSHOT when an artifact is being uploaded to snapshot repository. Often artifact repositories have that restriction.

options.auth.password

Type: String Default value: ''

Password to be used for authentication against nexus server

options.auth.username

Type: String Default value: ''

Username to be used for authentication against nexus server

options.insecure

Type: boolean Default value: false

Accept Self-Signed certificates when connecting over https.

options.url

Type: String Default value: ''

Nexus repository url. Usually /nexus/content/repositories/snapshots or /nexus/content/repositories/releases

options.artifact

Type: String Default value: ''

Artifact to be uploaded. Must be a file.

options.noproxy

Type: String Default value: '127.0.0.1'

list of comma separated addresses to exclude for which proxy is not applicable. This is a must when running proxy and HTTP_PROXY environment value is set.

options.cwd

Type: String Default value: ''

working directory from which deployer will deploy artifacts.

options.parallel

Type: Boolean Default value: 'false'

Whether to upload artifacts in parallel.

options.quiet

Type: Boolean Default value: 'false'

Chatty flag.

Usage Examples

Deploy to release repository

grunt.initConfig({
  nexusDeployer: {
    release: {
      options: {
		  groupId: "grunt-nexus-deployer",
		  artifactId: "grunt-nexus-deployer",
		  version: "1.0",
		  packaging: 'zip',
		  auth: {
			username:'admin',
			password:'admin123'
		  },
		  pomDir: 'build/pom',
		  url: 'http://localhost:8081/nexus/content/repositories/releases',
		  artifact: 'build/grunt-nexus-deployer.zip',
		  noproxy: 'localhost',
		  cwd: ''
		}
      }
    }
});

Deploy to snapshots repository

grunt.initConfig({
  nexusDeployer: {
    release: {
      options: {
		  groupId: "grunt-nexus-deployer",
		  artifactId: "grunt-nexus-deployer",
		  version: "1.0-SNAPSHOT",
		  packaging: 'zip',
		  auth: {
			username:'admin',
			password:'admin123'
		  },
		  pomDir: 'build/pom',
		  url: 'http://localhost:8081/nexus/content/repositories/snapshots',
		  artifact: 'build/grunt-nexus-deployer.zip',
		  noproxy: 'localhost',
		  cwd: '',
		  parallel:false,
		  quiet: true
		}
      }
    }
});

To run

grunt nexusDeployer

Release History

grunt-nexus-deployer's People

Contributors

skhatri avatar wismax avatar kwiatkk1 avatar joaogbcravo avatar alfred-mac avatar surlyburro avatar smatyas5am avatar alfred-thomas avatar ezeed avatar jandurovec avatar

Watchers

Ronald Treur avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.