SoftwareEntwicklung Beratung Schulung

A coders, hackers heaven.....Hm...I do not think so...

Apache Maven Verifier Plugin Version 1.1 Released

| Comments

The Apache Maven team is pleased to announce the release of the Apache Maven Verifier Plugin, version 1.1.

Useful for integration tests – verifies the existence of certain conditions.

Please be aware of the new location of our issue tracker which has been moved from Codehaus to Apache Software Foundation.

1
2
3
4
5
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-verifier-plugin</artifactId>
  <version>1.1</version>
</plugin>

Apache Maven JavaDoc Plugin Version 2.10.3 Released

| Comments

The Apache Maven team is pleased to announce the release of the Apache Maven JavaDoc Plugin, version 2.10.3.

The Javadoc Plugin uses the Javadoc tool to generate javadocs for the specified project.

Please be aware of the new location of our issue tracker which has been moved from Codehaus to Apache Software Foundation.

1
2
3
4
5
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <version>2.10.3</version>
</plugin>

Apache Maven DOCCK Plugin Version 1.1 Released

| Comments

The Apache Maven team is pleased to announce the release of the Apache Maven DOCCK, version 1.1.

This plugin checks that a project complies with the Plugin Documentation Standard.

You should specify the version in your project’s plugin configuration:

1
2
3
4
5
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-docck-plugin</artifactId>
  <version>1.1</version>
</plugin>

Please be aware of the new location of our issue tracker. which has been moved from Codehaus to Apache Software Foundation

Maven Prerequisites?

| Comments

Starting with Maven 3.3.1 it is possible to define several important configuration elements within your project. For example JVM parameters or some kind of build extensions. Unfortunately using such things may result is wrong or failing builds cause thos informations are not read by older Maven versions. How can you prevent such situations?

For a long time the prerequisites exists which defines the minimum Maven version to build with. I have to emphasize the build time.

One thing would be to define a prerequisites for your project which uses the new Maven 3.3.1 features like this in your pom.xml:

1
2
3
4
5
6
7
8
9
10
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
  ...
  <prerequisites>
    <maven>3.3.1</maven>
  </prerequisites>
  ...
</project>

The problem with prerequisites is that it had been marked deprecated for a long time (starting with Maven 3.0 MNG-4840, MNG-5297, MNG-5501) and the intention of prerequisites was to prevent maven plugins running with the wrong Maven versions. I supose you are not writing a plugin but you would like to prevent people from trying to build your project with the wrong Maven version which might fail or produces weird results. So the real questions comes up. What to do?

The simple solution for this problem is the maven-enforcer-plugin. By using the following in your pom file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<build>
  <plugins>
    ...
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-enforcer-plugin</artifactId>
      <version>1.4</version>
      <executions>
        <execution>
          <id>enforce-maven</id>
          <goals>
            <goal>enforce</goal>
          </goals>
          <configuration>
            <rules>
              <requireMavenVersion>
                <version>3.3.1</version>
              </requireMavenVersion>
            </rules>
          </configuration>
        </execution>
      </executions>
    </plugin>
    ...
  </plugins>
</build>

you will prevent anyone from using an earlier version of Maven than 3.3.1. This solutions will also prevent Maven 2.2.1 from trying to start building such a project.

A best practice is to define such enforcer rule into the company parent pom to define the minimum Maven versions you would like to support with your builds.

The conclusion is to use the maven-enforcer-plugin rule only to define the minimum maven version to build with.

Apache Maven Invoker Plugin Version 1.10 Released

| Comments

The Apache Maven team is pleased to announce the release of the Apache Maven Invoker Plugin, version 1.10.

The Invoker Plugin is used to run a set of Maven projects. The plugin can determine whether each project execution is successful, and optionally can verify the output generated from a given project execution.

This plugin is in particular handy to perform integration tests for other Maven plugins. The Invoker Plugin can be employed to run a set of test projects that have been designed to assert certain features of the plugin under test.

You should specify the version in your project’s plugin configuration:

1
2
3
4
5
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-invoker-plugin</artifactId>
  <version>1.10</version>
</plugin>

Apache Maven Shared Invoker Version 2.2 Released

| Comments

The Apache Maven team is pleased to announce the release of the Apache Maven Shared Maven Invoker, version 2.2

This API is concerned with firing a Maven build in a new JVM. It accomplishes its task by building up a conventional Maven command line from options given in the current request, along with those global options specified in the invoker itself. Once it has the command line, the invoker will execute it, and capture the resulting exit code or any exception thrown to signal a failure to execute. Input/output control can be specified using an InputStream and up to two InvocationOutputHandlers.

Important message for Windows users who want to invoke Apache Maven 3.3.1 and above:

Due to http://jira.codehaus.org/browse/MNG-5776 the start-script has been renamed from mvn.bat to mvn.cmd, which caused the previous versions of Maven Invoker to not being able to find the executable file anymore. This critical issue has been fixed in this release.

In the next release of the maven-invoker-plugin, which should be released soon, we’ll add this fix as well. In the meantime you can configure the plugin like this:

1
2
3
4
5
6
7
8
9
10
11
12
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-invoker-plugin</artifactId>
  <version>1.9</version>
  <dependencies>
    <dependency> <!-- remove when using maven-invoker-plugin 1.10 -->
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-invoker</artifactId>
      <version>2.2</version>
    </dependency>
  </dependencies>
</plugin>

Announcement: End of Life of Maven 2.2.1 - Plugins / JDK Roadmap

| Comments

Dear Maven Users,

based on the End of Life of Maven 2.2.1 (a year ago) now the time has come to make the final releases of Apache Maven Plugins which support Maven 2.X.

If you continue to use Maven 2.2.1 or earlier you have to be aware of using an completely unsupported Maven version as well as unsupported Maven plugins for the future.

If you want to have access to new features and bug fixes it is really necessary to update to new Maven versions.

The next Maven version which will go the same way as Maven 2.2.1 will be Maven 3.0.5.

We have documented the final releases of plugins which support Maven 2.2.1 in relationship with JDK 1.5.

The complete list can be found here:

http://maven.apache.org/maven-2.x-eol.html

The next step on our roadmap is to lift all plugin versions to 3.0.0 to make clear those plugins will only work with Maven 3.0+ furthermore the Java minimum requirement will be lifted to JDK 1.6 as well.

No “rule” without exceptions. Here they come:

  • maven-site-plugin (Version 3.4) See the docs of the plugin for usage in Maven 2.X

  • maven-compiler-plugin (Version 3.2) which works with Maven 2.2.1.

  • maven-plugin-plugin (Version 3.4) which works with Maven 2.2.1

  • maven-pmd-plugin (Version 3.4) which works with Maven 2.2.1 but needs JDK 1.6

The following plugins already have the Maven 3.0+ requirement:

  • maven-scm-publish-plugin (Version 1.1)
  • maven-shade-plugin (Version 2.3)

Currently the plan is to make those plugins which are already at 3.X being lifted to version 3.5.0 for Maven 3.X only:

  • maven-site-plugin (Version 3.5.0)

  • maven-compiler-plugin (Version 3.5.0)

  • maven-plugin-plugin (Version 3.5.0)

  • maven-pmd-plugin (Version 3.5.0)

All other plugins will get a version 3.0.0 to identify Maven 3.X only plugins and the JDK minimum will be 1.6.

Example: So to make things more clearer here is an example:

Currently we have the maven-clean-plugin with version 2.6.1.

This plugin supports Maven 2.2.1 and JDK 1.5 minimum.

This plugin will get a new major release with version 3.0.0 which has the Maven minimum 3.0 AND Java minimum 1.6.

Kind regards – The Apache Maven Team