Configure NetBeans to use the SDK
Partial integration between NetBeans and the Atlassian Plugin SDK can be achieved. The NetBeans IDE includes native support for Maven projects. The Atlassian Plugin SDK includes a bundled version of Maven.
An existing NetBeans user is unlikely to want to switch to the instance of Maven that comes with the Atlassian SDK.
Step 1 - Setup the environment so that atlas Maven commands can be invoked from the command line. See: Step 2. Install the Atlassian Plugin SDK
Step 2 - Create an empty plugin project using "atlas-create-confluence-plugin".
Step 3 - Modify the pom.xml
In order for NetBeans to pick up the necessary files to recognize this correctly you need to add the following to the project's pom.xml
and to the properties section add a reference to your locally installed Atlassian Maven repository, so that your pom.xml contains something like:
Open the project in NetBeans, it will report that the project is unloadable. To resolve this you need to perform a priming build.
- Right-click the project in the Projects tab
- Choose "Show and Resolve Problems..." which should be the second last entry
- Click the button labelled "Resolve..." for NetBeans 7.3 and later; or, the button labelled "Priming Build" in NetBeans 7.2.x and earlier.
The project will perform an initial build and load correctly once complete. Check the output window for the build status. After this Netbeans should recognize the plugin and be able to perform all the usual dependency maintenance and code editing as per usual. You just need to remember to do any actual compilation and packaging using the atlas-mvn command line tools.