The following steps show how to import ActiveMQ Artemis source into IntelliJ IDEA and setup the correct maven profile to allow running of JUnit tests from within the IDE. (Steps are based on version: 13.1.4)
This should open the import project wizard. From here:
Once the project has been imported and IDEA has caught up importing all the relevant dependencies, you should be able to run JUnit tests from with the IDE. Select any test class in the tests -> integration tests folder. Right click on the class in the project tab and click “Run ”. If the “Run ” option is present then you're all set to go.
We have shared the style templates that are good for this project. If you want to apply them use these steps:
If the “Run ” or “Run all tests” option is not present. It is likely that the default profile has not been imported properly. To (re)import the “tests” Maven profile in an existing project.
We recommend using Eclipse Kepler (4.3), due to the built-in support for Maven and Git. Note that there are still some Maven plugins used by sub-projects (e.g. documentation) which are not supported even in Eclipse Kepler (4.3).
Eclipse m2e is already included in “Eclipse IDE for Java Developers”, or it can be installed from Eclipse Kepler release repository.
It is strongly recommended to turn off the auto-updating of .gitignore files by the Git Team extension. Otherwise, it generates new .gitignore files in many directories that are not needed due to the top level .gitignore file. To turn it off, go to Preferences->Team->Git->Projects and deselect the “Automatically ignore derived resources” checkbox.
ActiveMQ Artemis uses JBoss Logging and that requires source code generation from Java annotations. In order for it to ‘just work’ in Eclipse you need to install the Maven Integration for Eclipse JDT Annotation Processor Toolkit m2e-apt. See this JBoss blog post for details.
Eclipse Indigo (3.7) has out-of-the-box support for it.
As of this writing, Eclipse Kepler (4.3) still lacks support for Maven's javacc plugin. The available m2e connector for javacc-maven-plugin requires a downgrade of Maven components to be installed. manual installation instructions (as of this writing you need to use the development update site). See this post for how to do this with Eclipse Juno (4.2).
The current recommended solution for Eclipse Kepler is to mark javacc-maven-plugin
as ignored by Eclipse, run Maven from the command line and then modify the project activemq-core-client
adding the folder target/generated-sources/javacc
to its build path.
Importing all ActiveMQ Artemis subprojects will create too many projects in Eclipse, cluttering your Package Explorer and Project Explorer views. One way to address that is to use Eclipse's Working Sets feature. A good introduction to it can be found at a Dzone article on Eclipse Working Sets.