Building your first plugin
When you have installed the Atlassian SDK, you can start building your first plugin. We will be building a new Confluence macro, which can be used to format content.
We will take a look at:
The macro interface, which is the base of all macros
The
xhtml-macro
moduleAdding resources, such as a stylesheet, to your plugin
We will be building a macro that displays links as buttons.
Creating the plugin project
First, we have to create our plugin skeleton using the Atlassian SDK and load our new project into Eclipse.
Open a command prompt and navigate to the location for you new plugin.
Enter the following command to create a new Confluence plugin:
atlas-create-confluence-plugin
When prompted, enter the following information to identify your plugin:
groupId
com.example.confluence
artifactId
button-macro
version
1.0-snapshot
package
com.example.confluence.button
Confirm your entries when prompted.
Start Eclipse.
Select File | Import... from the Eclipse menu...