resolved-pom-maven-plugin Maven Plugin

A maven plugin to filter specific properties in a pom files and attach the resulting pom to the build output

Лицензия

Лицензия

Категории

Категории

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

Группа

io.paradoxical
Идентификатор

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

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

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

1.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

resolved-pom-maven-plugin Maven Plugin
A maven plugin to filter specific properties in a pom files and attach the resulting pom to the build output
Ссылка на сайт

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

https://github.com/paradoxical-io/resolved-pom-maven-plugin
Система контроля версий

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

http://github.com/paradoxical-io/resolved-pom-maven-plugin

Скачать resolved-pom-maven-plugin

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

<plugin>
    <groupId>io.paradoxical</groupId>
    <artifactId>resolved-pom-maven-plugin</artifactId>
    <version>1.0</version>
</plugin>

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.apache.maven.shared : maven-filtering jar 3.1.1
org.apache.maven : maven-plugin-api jar 2.0
org.codehaus.plexus : plexus-utils jar 3.0.8

provided (1)

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

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.8.2

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

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

resolved-pom-maven-plugin

Build Status Maven Central

What

Install with

<plugin>
    <groupId>io.paradoxical</groupId>
    <artifactId>resolved-pom-maven-plugin</artifactId>
    <version>1.0</version>
    <configuration>
        <properties>
            <revision>${revision}</revision>
        </properties>
    </configuration>
    <executions>
        <execution>
            <id>resolve-my-pom</id>
            <phase>initialize</phase>
            <goals>
                <goal>resolve-pom</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Why

If you ever wanted to auto version your artifacts, you may have found this article describing what appears to be a simple way of doing so.

The problem comes when you try it, ${revision} doesn't get replaced in the distributed pom files (the ones up on maven central.) This causes huge issues with maven transitive dependency resolution. There was a fix posted a while ago to address some of the problems However this solution doesn't address when you need to GPG sign your artifacts (like you do to relase to maven central.)

With this plugin, you can use the ${revision} style versioning and still easily deploy to maven central

Other plugins

After this project was built I found another plugin that does the basically same thing (and in some ways was better!)

The only difference is that it replaces every property in the pom with it's filtered versions where as this plugin uses a white-listed approach.

Maven Internals

I spent a good amount of time looking through maven plugins and internals to figure out the easiest way to trick maven into doing what I want :)

Here is some of the resources i used:

Internals

  • Filtering: Understanding what filtering is doing

Plugins

  • Resources: useful as a how to do filtering reference
  • Install: this is where poms are installed by default, also useful for the stupid lastModified check they do on files
  • Gpg:Sign: Useful to figure out what order signatures are added
  • Nexus:Deploy: If you want to understand that crazy that is the nexus deploy plugin

Misc

io.paradoxical

Paradoxical Devs

Libraries and dockerized applications. Pull requests welcome!

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

Версия
1.0