I was wondering if it was possible to modify the output from maven to for example hide the lines that start with [INFO] or to be able to see lines that start with [DEBUG]?>
From their own docs, you want this:
RESULT=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) echo $RESULT
For reference, see: https://maven.apache.org/plugins/maven-help-plugin/evaluate-mojo.html#forceStdout