The Up-To-Date Maven Plugin.

Force using of up-to-date dependencies/parents

Лицензия

Лицензия

Категории

Категории

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

Группа

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

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

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

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

0.2.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

The Up-To-Date Maven Plugin.
Force using of up-to-date dependencies/parents
Организация-разработчик

Организация-разработчик

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

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

https://github.com/khmarbaise/uptodate-maven-plugin

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

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

<plugin>
    <groupId>com.soebes.maven.plugins</groupId>
    <artifactId>uptodate-maven-plugin</artifactId>
    <version>0.2.0</version>
</plugin>

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-core jar 3.1.1
org.apache.maven : maven-artifact jar 3.1.1
org.apache.maven.plugins : maven-plugin-plugin jar 3.3
org.eclipse.aether : aether-api jar 1.0.0.v20140518
org.eclipse.aether : aether-util jar 1.0.0.v20140518

provided (2)

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

test (3)

Идентификатор библиотеки Тип Версия
org.testng : testng jar 6.8.8
org.easytesting : fest-assert jar 1.4
org.mockito : mockito-core jar 1.9.5

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

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

UpToDate-Maven-Plugin

License

Apache License, Version 2.0, January 2004

Overview

Force the use of the most up-to-date released versions of an artifact.

The Basic idea for this plugin was born based on the discussion about the enforcer rule.

Sometimes you have a situation like using a parent pom but you would like to force the users in your company to use the newest version cause there had been changes which need for further development. This plugin can help in such situations.

Parent Check

The following pom snippet will show an example of a usual project which is using a parent:

<parent>
  <groupId>com.soebes.maven.plugins.test.integration</groupId>
  <artifactId>parent</artifactId>
  <version>0.2</version>
</parent>

<groupId>org.test.parent</groupId>
<artifactId>root</artifactId>
<version>1.0.0-SNAPSHOT</version>

So basically no problem at all. But what happens if a new version of that parent is released and you want to force people to use that new version? Simply you add the following definition to your project:

So every time you try to build this plugin will check if the parent is the newest version.

 <plugin>
   <groupId>com.soebes.maven.plugins</groupId>
   <artifactId>uptodate-maven-plugin</artifactId>
   <executions>
     <execution>
       <id>force-updrage</id>
       <goals>
         <goal>parent</goal>
       </goals>
       <phase>validate</phase>
     </execution>
   </executions>
 </plugin>

If it is not the newest version it will break the build. Furtunate you can skip that breaking by using the following property on command if you really need.

mvn -Duptodate.skip=true ...

Dependency Check

Default checking all dependencies of the current module if they are up-to-date.

Lets assume you have the following dependency in your pom:

<dependency>
  <groupId>org.xyz.test</groupId>  
  <artifactId>the-artifact</artifact>
  <version>1.3</version>
</dependency>

Sometime you must be sure to use always the newest version which is available.

Using the uptodate-maven-plugin will exactly check this situation.

If you need to check the parent of a parent to be always uptodate you could use the parent goal:

 <plugins>
   <plugin>
     <groupId>com.soebes.maven.plugins</groupId>
     <artifactId>uptodate-maven-plugin</artifactId>
     <executions>
       <execution>
         <id>check-dependencies</id>
         <goals>
           <goal>dependency</goal>
         </goals>
         <phase>validate</phase>
       </execution>
     </executions>
   </plugin>
   ..
 </plugins>

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

Версия
0.2.0
0.1.0