When the following command is executed, "groupId: artifactId: version" is displayed from guice-3.0.pom.
mvn -f guice-3.0.pom -q '-Dexec.executable=echo' '-Dexec.args=${project.groupId}:${project.artifactId}:${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.6.0:exec
You can freely change the output contents by changing the character string passed to exec.args. Reference: https://stackoverflow.com/a/39665194
It can be obtained as follows, but it seems that multiple parameters cannot be taken together.
mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate "-Dexpression=project.version" -q -DforceStdout
Reference: https://stackoverflow.com/a/3545363