利用maven-help-plugin在shell中读取pom_xml的变量
安装maven-help-plugin
1 | <dependency> |
读取变量
1 | RESULT=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) |
参考:
https://maven.apache.org/plugins/maven-help-plugin/evaluate-mojo.html
利用maven-help-plugin在shell中读取pom_xml的变量