How to use Eclipse on ActiveMQ

ActiveMQ projectsSee ActiveMQ site to get started. You’ll need subversion, maven and of course eclipse before you begin. By default the maven repository is in your home directory, e.g., ~/.m2/repository.

Here are the steps:

svn co activemq
cd activemq
mvn eclipse:eclipse

Now fire up Eclipse and import the root folder of the ActiveMQ source folder. This will create about a dozen projects. But the Eclipse build will fail due to the variable M2_REPO not being defined. Just get the Properties of one of these projects, go to the Java Build Path and Add a Variable. Define this variable to be the location of your maven repository. After you do this all of the errors will disappear, you’ll still get 1700 or so warnings. But you know that in a lot of projects warnings are intended to be ignored.

You’ll also need to get the activeio sources. 

svn co activeio

You’ll need to import this project to Eclipse too (activeio/activeio-core).

7 Responses to “How to use Eclipse on ActiveMQ”

  1. Dipesh Bhavsar Says:


    It was wonderful description, I had ever found on the Internet. I am just beginner of ActiveMQ. so I need your help. I want to work with Eclipse IDE and Tomcat server. My questions are as follow.

    1) Can I work with Tomcat.? (Or I need to add some plugging or need to change the server.)
    2) Is it compulsory to use Spring Framework?
    3) Can I use any other framework.?
    4) how can i configure Eclipse with tomcat and ActiveMQ.

    waiting for your reply.

  2. sj Says:

    Hello Dipesh,

    Thank you for your comment. You can work with Tomcat (install Sysdeo tomcat plugin for Eclipse). You don’t have to use Spring to use ActiveMQ, There are no ActiveMQ configurations for Eclipse. ActiveMQ is just another Maven project. So you would need to install Maven plugin.

  3. Dipesh Bhavsar Says:

    Hi Sj

    Thanks for your reply. It’s cool that I can work with ActiveMQ without Spring. I have referred blogs related to Maven and ActiveMQ on this website. Still I am struggling with configuration.

    Tell me, I have followed all the steps right or not.

    1) I have downloaded latest source of ActiveMQ from its home website that is version 5.2.0.
    2) I have copied that source in my C:\Program Files\Apache Software Foundation directory\apache-activeMQ.5.2.0
    3)I have maven already configured with my Eclipse. then also i run this command : “mvn -version” and it give me correct result in form of versions. It means my Maven is working right.
    4)Now, from Command prompt I went to activeMQ path.
    5)I have run the “mvn clean install”. but it gives me the error that no pom.xml found.
    6) I have tried to execute that “svn co —” string but it also not working.
    7) AS you had told that ActiveMQ is maven project so no need for any configuration. I had worked with Tapestry Framework. In that I was using string that creates Maven project from Command Prompt. Is there any similar string to create Maven Project from console.?
    8) I don’t know how to create ActiveMQ project or build it with Maven.

    Can you tell me the steps one by one to make a simple application in Eclipse using ActiveMQ?

  4. sj Says:

    Hi Dipesh,

    I don’t have eclipse or activemq on the machine that I’m on, so I cant verify the detail steps. From your description, it appears that you are issuing the maven clean/install command from the wrong directory. Maven command needs to be executed from the directory that has a pom.xml file. There are multiple projects in activemq, each has its own pom.xml file. If you want to build everything, then you need to be at the upmost directory with a pom.xml file.

    In Eclipse, make sure that you flag this project as a maven project. It should do it automatically, when you import this project or add it via the sub-version plugin. Check to see if eclipse considers the project(s) to be maven projects or not.

    Also check to see what is the default eclipse builder for these project. Reorder the builders and put the maven builder first (default builder).

    Maven is a pain to set up to configure with eclipse, I’m afraid. If I get the time and get to my computer with maven/eclipse I try to re-import the activemq project and document the steps. Have you installed the eclipse sub-version plugin? If not try that and then try to import activemq directly from eclipse.

  5. Dipesh Bhavsar Says:

    Hi SJ

    Thanks for reply.

    As per your guidance i have created simple maven project without any ActiveMQ groupID or ArtifactID. Its Working now. My Eclipse considers it as Maven Project.

    Can you tell me that from where I should run the “svn co activemq” command. AS I run this command from my command prompt, it gives me error that “SVN is not an internal command or batch file.”

    But, Can you give me example of pom.xml file ?. so that I can check it with my pom.xml file. This pom.xml file should have ActiveMQ dependency mapping.

    I had refered many websites for ActiveMQ. but i found everywhere they have used spring framework. Can you provide me any link or book that explains me ActiveMQ without Spring Framework. Otherwise before going to ActiveMQ i have to learn Spring Framework and EJB application.

    Dipesh Bhavsar

  6. Dipesh Bhavsar Says:

    Hi SJ

    Thanks for this blog. I found my solution from here itself.
    Actually I have not installed the SVN server or Tortoise SVN. and I was trying to run commands from wrong place.

    Now, I have installed and configured SVN. From these blog I got guidance and I have started working with ActiveMQ and Eclipse.

    Thanks for your kind guidance. 🙂

    Thanks & Regards
    ——————- – – –
    Dipesh Bhavsar

  7. vicky Says:

    hi I’m working on activemq with tomcat and eclipse
    I’m getting error
    ERROR] Failed to execute goal on project activemq-jaas: Could not resolve dependencies for project org.apache.activemq:activemq-jaas:bundle:5.6-SNAPSHOT: Could not transfer artifact from/to central ( Error transferring file: Operation timed out -> [Help 1]
    [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] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1]
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR] mvn -rf :activemq-jaas

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: