Search code examples
activemq-artemis

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


I get an error when I want to run any example through 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]

I tried to specify the path to the directory with artemis at startup, but it does not help mvn verify -Dartemis.home="D:\Documents\apache-artemis-2.17.0"

How to fix this error?


Solution

  • It appears you're running the example directly from the project source since it reports 2.18.0-SNAPSHOT. If that's the case then you should do what the ERROR message indicates:

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

    You can get a snapshot binary distribution here or you can build the distribution from the source using mvn install -Prelease -DskipTests.

    If you must point the example at a different home directory you can do so using the activemq.basedir system property, e.g.:

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

    Or you can change the activemq.basedir property defined in the example's pom.xml.