SoftwareEntwicklung Beratung Schulung

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

Apache Software Foundation Parent POM Version 20 Released

The Apache Maven team is pleased to announce the release of the Apache Software Foundation Parent POM Version 20.

You should specify the version in your project as parent like the following:

1
2
3
4
5
<parent>
   <groupId>org.apache</groupId>
   <artifactId>apache</artifactId>
   <version>20</version>
</parent>

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

http://maven.apache.org/pom/asf/download.html

Apache Maven Project Info Reports Plugin Version 3.0.0 Released

The Apache Maven team is pleased to announce the release of the Maven Project Info Reports Plugin version 3.0.0

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-project-info-reports-plugin</artifactId>
  <version>3.0.0</version>
</plugin>

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

Apache Maven ACR Plugin Version 3.1.0 Released

The Apache Maven team is pleased to announce the release of the Apache Maven ACR Plugin, Version 3.1.0.

This plugin generates J2EE Application Client file.

Important Note: This is a Maven 3.X only plugin and needs JDK 7 to run.

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

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

Apache Maven 3.5.4 Released

The Apache Maven team is pleased to announce the release of the Apache Maven 3.5.4.

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.

You can find out more about Apache Maven at https://maven.apache.org

You can download the appropriate sources etc. from the download page: https://maven.apache.org/download.cgi

Apache Maven Surefire Plugin Version 2.22.0 Released

The Apache Maven team is pleased to announce the release of the Apache Maven Surefire Plugin, version 2.22.0.

The release contains 33 bug fixes. Again we received contributions from the community in form of bug reports and bug fixes. Thank you and keep them coming!

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-surefire-plugin</artifactId>
  <version>2.22.0</version>
</plugin>

or for failsafe:

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

or for surefire-report:

1
2
3
4
5
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-report-plugin</artifactId>
  <version>2.22.0</version>
</plugin>

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.