没有 运行 个示例。找不到 artemis.home 错误

Сan't run examples. Couldn't find artemis.home error

当我想 运行 通过 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 消息指示的方式进行操作:

Use the binary distribution or build the distribution before running the examples

您可以获得快照二进制分发版 here 或者您可以使用 mvn install -Prelease -DskipTests.

从源构建分发版

如果您必须将示例指向不同的主目录,您可以使用activemq.basedir系统属性,例如:

mvn verify -Dactivemq.basedir="D:\Documents\apache-artemis-2.17.0"

或者您可以更改示例中 pom.xml 中定义的 activemq.basedir 属性。