当我想通过
mvn verify
运行任何示例时,出现错误
[ERROR] ********************************************************************************************
[ERROR] Could not locate suitable Artemis.home on either D:\Documents\IdeaProjects\activemq-artemis\examples\features\standard\security\..\..\..\.. or D:\Documents\IdeaProjects\activemq-artemis\examples\features\standard\security\..
\..\..\..\artemis-distribution\target\apache-artemis-2.18.0-SNAPSHOT-bin\apache-artemis-2.18.0-SNAPSHOT
[ERROR] Use the binary distribution or build the distribution before running the examples
[ERROR] ********************************************************************************************
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.087 s
[INFO] Finished at: 2021-02-26T22:03:39+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.activemq:artemis-maven-plugin:2.18.0-SNAPSHOT:create (create) on project security: Couldn't find artemis.home -> [Help 1]
我尝试在启动时指定artemis的目录路径,但没有帮助
mvn verify -Dartemis.home="D:\Documents\apache-artemis-2.17.0"
如何修复这个错误?
看来您是直接从项目源运行该示例,因为它报告了
2.18.0-SNAPSHOT
。如果是这种情况,那么您应该执行 ERROR
消息指示的操作:
在运行示例之前使用二进制发行版或构建发行版
您可以在这里获取快照二进制发行版,也可以使用
mvn install -Prelease -DskipTests
从源代码构建发行版。
如果您必须将示例指向不同的主目录,您可以使用
activemq.basedir
系统属性来实现,例如:
mvn verify -Dactivemq.basedir="D:\Documents\apache-artemis-2.17.0"
或者您可以更改示例中定义的
activemq.basedir
属性。pom.xml