如何使用 maven-release-plugin 3.0.0-M1 激活发布配置文件?

How to activate release profile with maven-release-plugin 3.0.0-M1?

maven 发布插件 3.0.0-M1 版本似乎没有像以前那样激活执行目标的配置文件。我用“release”配置了参数“releaseProfiles”,但它试图激活配置文件“pom.xml”。遵循调试日志中的一些行:

mvn release:perform -X
[INFO] --- maven-release-plugin:3.0.0-M1:perform (default-cli) @ release-example ---
[INFO] [perform] 3/3 run-perform-goals
[DEBUG] Executing: /bin/sh -c cd /data/src/gv2011/release-example/target/checkout && /programs/apache-maven-3.6.3/bin/mvn -X -D maven.repo.local=/home/u01/.m2/repository -s /tmp/release-settings8879316982474805713.xml -P pom.xml install
[INFO] [WARNING] The requested profile "pom.xml" could not be activated because it does not exist.

我在 https://github.com/gv2011/release-example 放了一个示例项目。

对之前的版本 2.5.3 做同样的事情,就可以正常工作了。对应的日志行是:

[DEBUG] Executing: /bin/sh -c cd /data/src/gv2011/release-example/target/checkout && /programs/apache-maven-3.6.3/bin/mvn -X -D maven.repo.local=/home/u01/.m2/repository -s /tmp/release-settings14990918664891992430.xml -P release install

这是一个错误吗?有解决方法吗?

发布插件3.0.0-M1版本known bug

虽然该问题已在 3.0.0-M2 中关闭,但由于另一个严重错误,M2 版本并未发布。现在,我们将不得不等待 3.0.0-M3 或最终的 3.0.0 版本。