Maven: Overview for the values of Maven properties
the maven-help-plugin does what you want, just call it with -Dexpression=project.properties
this will print the properties tag of the effective pom.
tl;dr
mvn help:evaluate -Dexpression=project.properties
Bonus Points when you just want the properties output and not the maven output
mvn help:evaluate -Dexpression=project.properties -q -DforceStdout
or with the explicit version because -DforceStdout
works since version 3.1.0
mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.properties -q -DforceStdout
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 set by Maven such as project.build.outputDirectory
, basedir
, and settings.localRepository
.