The Up-To-Date Maven Plugin.

Force using of up-to-date dependencies/parents

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.soebes.maven.plugins
ArtifactId

ArtifactId

uptodate-maven-plugin
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

The Up-To-Date Maven Plugin.
Force using of up-to-date dependencies/parents
Project Organization

Project Organization

SoftwareEntwicklung Beratung Schulung
Source Code Management

Source Code Management

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

Download uptodate-maven-plugin

How to add to project

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

Dependencies

compile (5)

Group / Artifact Type Version
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)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.3
org.apache.maven : maven-plugin-api jar 3.1.1

test (3)

Group / Artifact Type Version
org.testng : testng jar 6.8.8
org.easytesting : fest-assert jar 1.4
org.mockito : mockito-core jar 1.9.5

Project Modules

There are no modules declared in this project.

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>

Versions

Version
0.2.0
0.1.0