cifriendly-maven-plugin Maven Mojo

This plugin helps with configuring Maven projects (especially multi-modules) for them to be Continuous Integration friendly.

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка
Группа

Группа

com.teamtter.maven
Идентификатор

Идентификатор

cifriendly-maven-plugin
Последняя версия

Последняя версия

1.0.8
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

cifriendly-maven-plugin Maven Mojo
This plugin helps with configuring Maven projects (especially multi-modules) for them to be Continuous Integration friendly.
Ссылка на сайт

Ссылка на сайт

http://maven.apache.org
Система контроля версий

Система контроля версий

https://github.com/fmarot/cifriendly-maven-plugin

Скачать cifriendly-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.teamtter.maven</groupId>
    <artifactId>cifriendly-maven-plugin</artifactId>
    <version>1.0.8</version>
</plugin>

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-core jar 3.5.0
org.apache.maven : maven-artifact jar 3.5.0
org.apache.maven : maven-model jar 3.5.0
org.apache.maven : maven-plugin-api jar 3.5.0
de.pdark : decentxml jar 1.4
org.projectlombok : lombok jar 1.16.16

provided (2)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5
org.slf4j : slf4j-api jar 1.7.5

test (2)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-simple jar 1.7.5
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Build Status Latest Maven Central deployment

Goal

Extension

TODO:

on specific content in mavenSession.getRequest().getGoals() ⇒ we should autoskip the plugin to avoid messing with incompatible goals

flatten

Replace the '${revision}' variables in all pom.xml of the MultiModule Maven Project with the real hardcoded version found in the upper pom’s properties/revision node.

For example all child pom’s "${revision}" version in their <parent> declaration will be replaced with the hardcoded "1.2.3-SNAPSHOT" if the upper pom contains:

<properties>
	<revision>1.2.3-SNAPSHOT</revision>
	...
</properties>

unflatten

First, in the upper pom, the hardcoded version is transfered into the properties/revision node, overwriting any previous value. So after a Maven release, the properties/revision node will see the correct version again.

Then it replaces the hardcoded version in all the poms (including the upper one) with a "${revision}" variable. In the upper pom.

Warning: caveats of CI friendly

using CI friendly Maven forces the local dev to always execute from the upper pomso that ${revision} is defined. Otherwise child pom will not know their parent.

So we have to use the --projects feature of Maven from the root if we want to build only a specific child. We can not build directly from its sub-directory.

TODO

  • for flatten Mojo, use the same principle as for the unflatten Mojo so that we can have better logs (no saying "Rewriting pom" when in fact the pom is already flattened)

Usage

mvn com.teamtter.maven:cifriendly-maven-plugin:1.0.8:unflatten

Technical details

the library "decentxml" is used to keep pom formatting

Tip

To change the version of a CIFriendly multi-module (or single) project, just use:

mvn versions:set-property -DnewVersion=3.0.0-SNAPSHOT -Dproperty=revision

Версии библиотеки

Версия
1.0.8
1.0.7
1.0.6