Giter Club home page Giter Club logo

drone-java-maven-plugin's Introduction

Drone Java Maven Plugin

A Drone plugin to build Java applications using Apache Maven.

Usage

The following settings changes this plugin's behavior.

  • context_dir (optional) The context directory within the source repository where pom.xml is found to execute the maven goals. Defaults to Drone workspace root.
  • goals (optional) An array of maven goals to run.Defaults: -DskipTests clean install.
  • maven_modules (optional) An array of maven modules to be built incase of a multi module maven project.
  • maven_mirror_url (optional) The Maven repository mirror url.
  • server_user (optional) The username for the maven repository manager server.
  • server_password (optional) The password for the maven repository manager server.
  • proxy_user (optional) The username for the proxy server.
  • proxy_password (optional) The password for the proxy server.
  • proxy_port (optional) Port number for the proxy server.
  • proxy_host (optional) Proxy server Host.
  • proxy_non_proxy_hosts (optional) An array of non proxy server hosts.
  • proxy_protocol (optional) Protocol for the proxy ie http or https.

Below is an example .drone.yml that uses this plugin.

kind: pipeline
name: default

steps:
- name: build-java-app
  image: docker.io/kameshsampath/drone-java-maven-plugin:v1.0.2
  pull: if-not-exists
  settings:
    goals: 
    - clean 
    - install 

Building

Build the plugin image:

./scripts/build.sh

Testing

Execute the plugin from your current working directory:

docker run --rm -e MAVEN_MIRROR_URL='http://192.168.68.120:8081/repository/maven-public/' \
  -e GOALS='clean package' \
  -e DRONE_COMMIT_SHA=8f51ad7884c5eb69c11d260a31da7a745e6b78e2 \
  -e DRONE_COMMIT_BRANCH=master \
  -e DRONE_BUILD_NUMBER=43 \
  -e DRONE_BUILD_STATUS=success \
  -w /drone/src \
  -v $(pwd):/drone/src \
  docker.io/kameshsampath/drone-java-maven-plugin:v1.0.2

drone-java-maven-plugin's People

Contributors

kameshsampath 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.