UpToDate Maven Plugin Version 0.1.0 Released
Hi to all,
i have released the first version of the UpToDate Maven Plugin which is intended to check for updates of your dependencies or of your parent. Sometimes it is vital to be on the most uptodate version of an artifact. This can be done organizationally but often people just miss that point. This will lead to help desk calls etc. which is time consuming. This can be solved by using the uptodate-maven-plugin which automatically checks the dependencies or your parent.
The basic idea was seeded by the JIRA entry for maven-enforcer but i realized that a maven-enforcer rule was not the right path to solve it. So this was the reason to create this plugin.
The uptodate-maven-plugin is available via Maven Central.
1<plugin>
2 <groupId>com.soebes.maven.plugins</groupId>
3 <artifactId>uptodate-maven-plugin</artifactId>
4 <version>0.1.0</version>
5</plugin>
Lets take a look at a real example like the following:
1<parent>
2 <groupId>com.soebes.maven.plugins.test.integration</groupId>
3 <artifactId>parent</artifactId>
4 <version>0.1</version>
5</parent>
6
7<groupId>org.test.parent</groupId>
8<artifactId>root</artifactId>
9<version>1.0.0-SNAPSHOT</version>
10
11<name>Parent Test</name>
12
13<build>
14 <plugins>
15 <plugin>
16 <groupId>com.soebes.maven.plugins</groupId>
17 <artifactId>uptodate-maven-plugin</artifactId>
18 <version>0.1.0</version>
19 <executions>
20 <execution>
21 <id>parent-check</id>
22 <goals>
23 <goal>parent</goal>
24 </goals>
25 <phase>validate</phase>
26 </execution>
27 </executions>
28 </plugin>
29 </plugins>
30</build>
The above build will run fine if the given parent exists only in the version 0.1, but the build will fail if you deploy a new version of your parent for example 0.2. This makes sure your projects will use only the newest version of an existing parent.
If you really hit the situation where this is wrong you can use
the skip option of the plugin uptodate.skip
to temporarily
disable this rule.
If you have ideas / improvements / bugs don not hesitate to contact me via github.
If you have the requirement to check your dependencies to be
up-to-date you can use the goal dependency
instead.
1<parent>
2 <groupId>com.soebes.maven.plugins.test.integration</groupId>
3 <artifactId>parent</artifactId>
4 <version>0.1</version>
5</parent>
6
7<groupId>org.test.parent</groupId>
8<artifactId>root</artifactId>
9<version>1.0.0-SNAPSHOT</version>
10
11<name>Parent Test</name>
12
13<dependencies>
14 <dependency>
15 <groupId>com.soebes.maven.plugins.test.integration</groupId>
16 <artifactId>dep-01</artifactId>
17 <version>0.1</version>
18 </dependency>
19</dependencies>
20
21<build>
22 <plugins>
23 <plugin>
24 <groupId>com.soebes.maven.plugins</groupId>
25 <artifactId>uptodate-maven-plugin</artifactId>
26 <version>0.1.0</version>
27 <executions>
28 <execution>
29 <id>dependency-check</id>
30 <goals>
31 <goal>dependency</goal>
32 </goals>
33 <phase>validate</phase>
34 </execution>
35 </executions>
36 </plugin>
37 </plugins>
38</build>
The above build will run fine if your given dependency
com.soebes.maven.plugins.test.integration:dep-01:0.1
is the most up-to-date one. Your build will fail
if exist a newer version of this dependency.