当我想通过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"。
如何修复此错误?
发布于 2021-02-26 19:45:19
由于该示例报告了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属性。
https://stackoverflow.com/questions/66391572
复制相似问题