How Do You Troubleshoot the ActiveMQ Build Failure “No plugin found for prefix ‘activemq-perf'”?

Problem scenario
You run this command:

sudo /opt/maven/bin/mvn activemq-perf:broker -Durl=broker:tcp://localhost:61616

You get this result:

[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 17 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kB at 25 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.815 s
[INFO] Finished at: 2020-04-28T15:33:05Z
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'activemq-perf' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/root/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

What should you do?

Solution
Change directories to where the correct pom.xml file is. You could try this command:

sudo find / -name pom.xml

Here is the content of a pom.xml file that could work:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.acme</groupId>
  <artifactId>run-amq</artifactId>
  <version>1.0-SNAPSHOT</version>
  <build>
    <plugins>
      <plugin>
    <groupId>org.apache.activemq.tooling</groupId>
    <artifactId>activemq-perf-maven-plugin</artifactId>
    <version>5.15.12</version>
      </plugin>
    </plugins>
  </build>
</project>

For future reference, here is a potential directory of the correct pom.xml file: /usr/local/apache-activemq/activemq-tooling/

Leave a comment

Your email address will not be published. Required fields are marked *