GithubHelp home page GithubHelp logo

renovate-bot / xwiki-contrib-_-parent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xwiki-contrib/parent

0.0 0.0 0.0 131 KB

Provide various parent pom.xml for contrib extensions

License: GNU Lesser General Public License v2.1

Shell 100.00%

xwiki-contrib-_-parent's Introduction

Provide various parent pom.xml for contrib extensions.

Extensions are automatically released on http://nexus.xwiki.org and http://jira.xwiki.org if your user have the proper rights.

Missing a specific version of those pom for your need ?

One version is always published for each LTS branch since that's what contrib extensions are recommended to support.

If you need a specific version there is two possibilities:

  • in most cases it's enough to use the closest lower version (8.4-8 for example) and set the following property <commons.version>8.4.2</commons.version>
  • in more complex use case (like parent-platform-distribution) you will need the exact same version, don't hesitate to create a TASK issue on https://jira.xwiki.org/browse/CPARENT

Bugs

Most released versions have a corresponding branch (usually master for latest versions) so you can create a pull request there. If you are not sure how to fix it create an issue on https://jira.xwiki.org/browse/CPARENT.

Examples

For extensions having xwiki-platform dependencies:

  <parent>
    <groupId>org.xwiki.contrib</groupId>
    <artifactId>parent-platform</artifactId>
    <version>15.9</version>
  </parent>

For extensions having xwiki-rendering and xwiki-commons dependencies:

  <parent>
    <groupId>org.xwiki.contrib</groupId>
    <artifactId>parent-rendering</artifactId>
    <version>15.9</version>
  </parent>

For extensions having xwiki-commons dependencies only:

  <parent>
    <groupId>org.xwiki.contrib</groupId>
    <artifactId>parent-commons</artifactId>
    <version>15.9</version>
  </parent>

For custom XWiki distributions:

  <parent>
    <groupId>org.xwiki.contrib</groupId>
    <artifactId>parent-platform-distribution</artifactId>
    <version>15.9</version>
  </parent>

Versions

Version is <branch>[-<buildnumber>] as in 6.4-3 which is the 3rd update of the parent pom to use for contrib extension which support XWiki 6.4 version and more.

You can then use ${commons.version}, ${rendering.version} or ${platform.version} depending on where you dependency come from as in:

    <dependency>
      <groupId>org.xwiki.commons</groupId>
      <artifactId>xwiki-commons-component-api</artifactId>
      <version>${commons.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.rendering</groupId>
      <artifactId>xwiki-rendering-api</artifactId>
      <version>${rendering.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-oldcore</artifactId>
      <version>${platform.version}</version>
    </dependency>

Properties

It's possible to customize a bit the behavior of the parent pom using some properties.

Previous version

By default revapi plugin is executed to check if you broke any API. It automatically find out the previous version but sometime it's not exacting the one you want to compare with.

You can control the version to use as previous version with the property xwiki.compatibility.previous.version as in:

  <properties>
    <xwiki.compatibility.previous.version>15.0</xwiki.compatibility.previous.version>
  </properties>

Nexus plugin

By default the maven artifact are going to be automatically released on http://nexus.xwiki.org. If you want to keep it in two passes (you want to test the deployed artifact before the release or the doing the Maven release is not the same as the one validating the release) you can control the behavior with the properties <xwiki.nexus.skipStaging> and <xwiki.nexus.autoReleaseAfterClose> as in:

  <properties>
    <!-- Completely skip the Nexus plugin -->
    <xwiki.nexus.skipStaging>true</xwiki.nexus.skipStaging>
    <!-- Disable the automatic release after the clone -->
    <xwiki.nexus.autoReleaseAfterClose>false</xwiki.nexus.autoReleaseAfterClose>
  </properties>

Issue Management

You can set the http://jira.xwiki.org based issue management system and URL in the properties as follow:

    <xwiki.issueManagement.jira.id>LDAP</xwiki.issueManagement.jira.id>

If your project is not hosted on http://jira.xwiki.org you can also do the following:

    <xwiki.issueManagement.system>jira</xwiki.issueManagement.system>
    <xwiki.issueManagement.url>http://jira.mydomain.com/browse/MYID</xwiki.issueManagement.url>

Enable automatic Jira release

If you want to automatically create (if it does not already exist) and release the version on Jira when you release on Maven you can enable it using the Maven property xwiki.release.jira.skip as in:

  <properties>
    <xwiki.release.jira.skip>false</xwiki.release.jira.skip>
  </properties>

You will also need to indicate your credentials in ~/.m2/settings.xml file:

  <server>
    <id>jira.xwiki.org</id>
    <username>myJiraLogin</username>
    <password>myJiraPassword</password>
  </server>

Test coverage

You can indicate the minimum test coverage you want to pass the build using the property <xwiki.jacoco.instructionRatio>

Here is an example which requiring that at least 50% of your code is executed during tests:

    <xwiki.jacoco.instructionRatio>0.50</xwiki.jacoco.instructionRatio>

If it's not you will see a message like the following:

[WARNING] Rule violated for bundle my-module: instructions covered ratio is 0.40, but expected minimum is 0.50

Release of a new parent pom

The Maven Release Plugin cannot be used for these pom.xml because one of the goal is to make sure release setup is a clean slate when you use them as parent.

  • Go to the right branch. Use master when releasing a non-LTS version.
  • Note: you don't need to edit the versions since the new version will asked during the release script execution and the various pom.xmlfiles will be updated automatically.
  • execute ./release.sh

xwiki-contrib-_-parent's People

Contributors

acotiuga avatar aubincleme avatar enygma2002 avatar gdelhumeau avatar lucaa avatar manuelleduc avatar mflorea avatar michitux avatar rstavro avatar slauriere avatar surli avatar tmortagne avatar vmassol 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.