SoftwareEntwicklung Beratung Schulung

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

Apache Maven Enforcer Plugin Version 3.0.0-M2 Released

The Apache Maven team is pleased to announce the release of the Apache Maven Enforcer Plugin, version 3.0.0-M2.

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-enforcer-plugin</artifactId>
  <version>3.0.0-M2</version>
</plugin>

You can download the appropriate sources etc. from the download page:

https://maven.apache.org/enforcer/download.cgi

Apache Maven WAR Plugin Version 3.2.2 Released

The Apache Maven team is pleased to announce the release of the Apache Maven WAR Plugin, version 3.2.2.

The WAR Plugin is responsible for collecting all artifact dependencies, classes and resources of the web application and packaging them into a web application archive.

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-war-plugin</artifactId>
  <version>3.2.2</version>
</plugin>

You can download the appropriate sources etc. from the download page.

Important Note:

  • Maven 3.X only
  • JDK 7 minimum requirement

Get the Version of Your Maven Project on Command Line?

I bet you have been faced with the situation to get the version of your Maven project on command line? So the question is how to get it? I have seen many solutions via using Linux tools like grep, cat or awk etc. also seen many solutions like using exec-maven-plugin like this:

1
2
3
4
5
VERSION=$(mvn -q \
  -Dexec.executable="echo" \
  -Dexec.args='${project.version}' \
  --non-recursive \
  org.codehaus.mojo:exec-maven-plugin:1.6.0:exec)

Unfortunately the above approach will not work on Windows.

Starting with Maven Help Plugin Release 3.1.0 this can be done more easier like the following:

1
mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout

This will exactly print out the version of your artifact on stdout and nothing else. Also no line feed is printed out.

So this can be used easily in scripts like this:

1
VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)

If you have correctly pinned the version of your plugins in your pom file or in a parent pom of the project this can be simplified like this:

1
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)

Apart from extracting the version you can also extract other information from the pom file like the following:

1
GROUPID=$(mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout)

More sophisticated expressions like the following are possible too:

1
2
3
4
GROUPID=$(mvn help:evaluate \
  -Dexpression=project.dependencyManagement.dependencies[0].groupId \
  -q -DforceStdout \
)

Apache Maven Help Plugin Version 3.1.0 Released

The Apache Maven team is pleased to announce the release of the Apache Maven Help Plugin, version 3.1.0

The Maven Help Plugin is used to get relative information about a project or the system. It can be used to get a description of a particular plugin, including the plugin’s goals with their parameters and component requirements, the effective POM and effective settings of the current build, and the profiles applied to the current project being built.

Important Notes since Version 3.0.0

  • Maven 3+ only
  • JDK 7 minimum requirement

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-help-plugin</artifactId>
  <version>3.1.0</version>
</plugin>

You can download the appropriate sources etc. from the download page.

Apache Maven PMD Plugin Version 3.10.0 Released

The Maven team is pleased to announce the release of the Apache Maven PMD Plugin, version 3.10.0

A Maven plugin for the PMD toolkit, that produces a report on both code rule violations and detected copy and paste fragments, as well as being able to fail the build based on these metrics.

You can download the appropriate sources etc. from the download page:

https://maven.apache.org/plugins/maven-pmd-plugin/download.cgi

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-pmd-plugin</artifactId>
  <version>3.10.0</version>
</plugin>

Plexus Codehaus: Plexus Interpolation Version 1.25 Released

The Codehaus Plexus team is pleased to announce the release of the Plexus Interpolation Version 1.25

Plexus interpolator is the outgrowth of multiple iterations of development focused on providing a more modular, flexible interpolation framework for the expression language style commonly seen in Maven, Plexus, and other related projects.

It has its foundation in the org.codehaus.plexus.utils.interpolation package within plexus-utils, but has been separated in order to allow these two libraries to vary independently of one another.

1
2
3
4
5
<dependency>
  <groupId>org.codehaus.plexus</groupId>
  <artifactId>plexus-interpolation</artifactId>
  <version>1.25</version>
</dependency>

Release Notes

Enjoy,

-The Codehaus Plexus team

Karl-Heinz Marbaise

Apache Maven Invoker Plugin Version 3.1.0 Released

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

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>3.1.0</version>
</plugin>

You can download the appropriate sources etc. from the download page:

https://maven.apache.org/plugins/maven-invoker-plugin/download.cgi

Apache Maven Shared Invoker Version 3.1.0 Released

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

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.

You can download the appropriate sources etc. from the download page.

1
2
3
4
5
6
7
<dependencies>
  <dependency>
    <groupId>org.apache.maven.shared</groupId>
    <artifactId>maven-invoker</artifactId>
    <version>3.1.0</version>
  </dependency>
</dependencies>

Apache Maven JavaDoc Plugin Version 3.0.1 Released

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

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

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

You can download the appropriate sources etc. from the download page:

https://maven.apache.org/plugins/maven-javadoc-plugin/download.cgi