GithubHelp home page GithubHelp logo

farmgeek4life / plugin-pom Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jenkinsci/plugin-pom

0.0 1.0 0.0 53 KB

Parent POM for Jenkins Plugins

Home Page: https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial

License: MIT License

plugin-pom's Introduction

plugin-pom

Parent POM for Jenkins Plugins

This new parent POM is decoupled from the core Jenkins project, both from the Maven and repository perspectives.

The main changes are:

  • Reduced number of overridable properties. All references (e.g. dependencies and plugin versions) not thought to be overridden are no longer based on properties. The main remaining overridable properties are:
    • jenkins.version: The Jenkins version required by the plugin.
    • jenkins-test-harness.version: The JTH version used to test plugin. Uses split test-harness (see JENKINS-32478). If the required Jenkins version is 1.580.1 or higher, JTH 2.1+ is recommended.
    • hpi-plugin.version: The HPI Maven Plugin version used by the plugin.
    • stapler-plugin.version: The Stapler Maven plugin version required by the plugin.
    • java.level: The Java version to use to build the plugin.
    • java.level.test: The Java version to use to build the plugin tests.
    • In order to make their versions the same as the used core version, slf4jVersion, node.version and npm.version properties are provided.
  • Tests are skipped during the perform phase of a release (can be overridden by setting release.skipTests to false).
  • General clean up.

Being able to specify the jenkins.version simplifies testing the plugin with different core versions, which is important, among others, for the Plugin Compatibility Testing.

In order to use the new POM:

  • Change the parent POM of your plugin:
  <parent>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>plugin</artifactId>
    <version>2.3</version> <!-- or later -->
  </parent>
  • Override the needed properties, e.g.:
  <properties>
    <jenkins.version>1.609.1</jenkins.version>
    <hpi-plugin.version>1.106</hpi-plugin.version>
  </properties>

It is handy to be able to select different Jenkins baselines with a Maven profile. To set this up, you must edit your ~/.m2/settings.xml to include some new entries in the <profiles> section. For example:

<profile>
    <id>jenkins-2</id>
    <properties>
        <jenkins.version>2.0</jenkins.version>
        <hpi-plugin.version>1.115</hpi-plugin.version>
        <stapler-plugin.version>1.17</stapler-plugin.version>
        <java.level>7</java.level>
    </properties>
</profile>
<profile>
    <id>jenkins-651</id>
    <properties>
        <jenkins.version>1.651.1</jenkins.version>
        <hpi-plugin.version>1.115</hpi-plugin.version>
        <stapler-plugin.version>1.17</stapler-plugin.version>
        <java.level>7</java.level>
    </properties>
</profile>
<profile>
    <id>jenkins-642</id>
    <properties>
        <jenkins.version>1.642.3</jenkins.version>
        <hpi-plugin.version>1.115</hpi-plugin.version>
        <stapler-plugin.version>1.17</stapler-plugin.version>
        <java.level>7</java.level>
    </properties>
</profile>
<profile>
    <id>jenkins-625</id>
    <properties>
        <jenkins.version>1.625.3</jenkins.version>
        <hpi-plugin.version>1.106</hpi-plugin.version>
        <stapler-plugin.version>1.17</stapler-plugin.version>
        <java.level>7</java.level>
    </properties>
</profile>
<profile>
    <id>jenkins-609</id>
    <properties>
        <jenkins.version>1.609.3</jenkins.version>
        <hpi-plugin.version>1.106</hpi-plugin.version>
        <stapler-plugin.version>1.17</stapler-plugin.version>
        <java.level>6</java.level>
    </properties>
</profile>
<profile>
    <id>jenkins-596</id>
    <properties>
        <jenkins.version>1.596.3</jenkins.version>
        <hpi-plugin.version>1.106</hpi-plugin.version>
        <stapler-plugin.version>1.17</stapler-plugin.version>
        <java.level>6</java.level>
    </properties>
</profile>
<profile>
    <id>jenkins-580</id>
    <properties>
        <jenkins.version>1.580.3</jenkins.version>
        <hpi-plugin.version>1.106</hpi-plugin.version>
        <stapler-plugin.version>1.17</stapler-plugin.version>
        <java.level>6</java.level>
    </properties>
</profile>
<profile>
    <id>jenkins-565</id>
    <properties>
        <jenkins.version>1.565.3</jenkins.version>
        <jenkins-test-harness.version>1.565.3</jenkins-test-harness.version>
        <hpi-plugin.version>1.106</hpi-plugin.version>
        <stapler-plugin.version>1.17</stapler-plugin.version>
        <java.level>6</java.level>
    </properties>
</profile>

Now for example if your plugin normally builds against 1.625.x, but you wish to test compatibility with 1.651.x, there is no need to edit your POM. Just run:

mvn -Pjenkins-651 clean test

or

mvn -Pjenkins-651 hpi:run

plugin-pom's People

Contributors

abayer avatar andresrc avatar batmat avatar farmgeek4life avatar jglick avatar superboum avatar svanoort avatar tfennelly avatar

Watchers

 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.