Contact Us 1-800-596-4880

Writing Extensions in IntelliJ

IntelliJ includes out of the box Maven support therefore it doesn’t require for you to download any extra plugins.

This guide was built using IntelliJ X but earlier or later versions should work as well

Importing the project

After you have generated your project with our Maven archetype, choose File → New Project and select Import project from an external resource

Screen+shot+2011-02-17+at+1.10.40+PM

Click Next and choose Maven

Screen+shot+2011-02-17+at+1.10.59+PM

Click Next and input the source folder where your project was generated. Leave everything else as default.

Screen+shot+2011-02-17+at+1.11.26+PM

Click Next and pick your main artifact

Screen+shot+2011-02-17+at+1.11.39+PM

Click Next

Screen+shot+2011-02-17+at+1.11.49+PM

Now, click Finish.

You IDE should start importing your Maven dependencies.

Resolving the schema

Now, you need to instruct your IDE to help it find you newly generated schema so you get all the benefits from auto complete and validation.

Open the namespace handler xml that was generated for you by the archetype.

You should see something along the lines of this:

Screen+shot+2011-02-17+at+1.12.17+PM

Select Manually Setup External Resource and pick the schema under target/generated-resources/mule.

Screen+shot+2011-02-17+at+1.12.56+PM

That should be it. Now you’re done.