Is Maven ready for JDK9?

Here is the answer from one Maven PMC member (me): No, it is not. Robert Scholte is working on it. Jigsaw and other stuff introduced a lot of changes. There is no official timeframe where full compat (Maven + official plugins) will be given. The issue you see is actually not Maven but Plexus Archiver. … Read more

How to override the `project.build.finalName` Maven property from the command line?

See Introduction to the POM finalName is created as: <build> <finalName>${project.artifactId}-${project.version}</finalName> </build> One of the solutions is to add own property: <properties> <finalName>${project.artifactId}-${project.version}</finalName> </properties> <build> <finalName>${finalName}</finalName> </build> And now try: mvn -DfinalName=build clean package

Maven: Overview for the values of Maven properties

As a workaround, add this to the <plugins> … </plugins> section inside your project’s pom.xml: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <phase>validate</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <echoproperties /> </tasks> </configuration> </execution> </executions> </plugin> Now execute mvn validate. On the console, prefixed with [echoproperties], there will be the full list of system properties, including those … Read more

Maven Compilation Error: (use -source 7 or higher to enable diamond operator)

Check how your maven-compiler-plugin is configured, it should use java version 7 or higher: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> For a more complete answer see the one below.

How to check pom.xml for updated dependencies

You can do this with the Versions Maven Plugin. Check the following goals: versions:display-dependency-updates scans a project’s dependencies and produces a report of those dependencies which have newer versions available. versions:display-plugin-updates scans a project’s plugins and produces a report of those plugins which have newer versions available. Here is a sample output (taken from the … Read more