Code Monkey home page Code Monkey logo

mvn-example-sign-only-if-ci's Introduction

Maven Example: Sign only if CI

This example show how to sign an exe from maven with the following requirements:

  • the signing configuration must happen in a parent pom so many project can share the same configuration
  • the signing should only be performed from the CI server and not from the usual developer workstation.

The biggest problem to make it works is that the jsign-maven-plugin does not have any skip parameter.

The trick to make it work is to associate the plugin execussion to a nonexisting phase 'none'. But to allow this phase definition to be overiden somewhere else. The rest is standard maven plugin management.

Thanks to the following post for the idea: https://www.igorkromin.net/index.php/2017/03/17/skipping-execution-of-maven-plugins-that-do-not-have-a-native-skip-option/

How to run the example

to run the maven build as a developer:

mvn -f child/pom.xml package

to run the maven build as a CI server:

mvn -f child/pom.xml -s settings.xml package

note that the execussion will fail as the exe and the java keystore don't exist in this example

mvn-example-sign-only-if-ci's People

Contributors

jouvent avatar

Watchers

 avatar James Cloos 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.