This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.
This documentation relates to an early version of Confluence.
View this page in the current documentation or visit the current documentation home.

UPT 1 - Getting Started

All Versions
Click for all versions
Confluence 2.0 to 2.5 Documentation

Index

Set up the Plugin Source Directory

First things first, I'm going to need somewhere to put all my source code.

The Confluence Plugin Development Kit contains a template directory that you can rename to use for your own plugin. Having a standard directory structure is useful, because it allows you to use maven (or the ant tasks packaged in the plugins directory of your Confluence installation) to build your plugin jar. If you use a different directory structure, you'll have to build the plugin yourself.

You'll have to think of a name for your plugin. There are probably better names than userinfo, but I started this late on a Thursday afternoon. Also, you'll need a package name for your Java code. The Java standard for package names is to reverse your company's domain-name, which is exactly what I've done here:

I'm going to be doing all my development for this tutorial in the plugins directory of a copy of Confluence 2.2.5 that I downloaded from the Atlassian website

The Unreliable Narrator

In fact, I'll be doing all of my development in the same development environment I use to develop Confluence itself. I will then be copying it into the aforementioned plugins directory and taking screenshots, and pretending that's how I developed it in the first place.

In cooking shows, this would be called "...and here's one I prepared earlier."

Make an Empty atlassian-plugin.xml file.

You'll need to choose a unique plugin key. I can use the confluence.extra prefix for my plugin keys because I work at Atlassian. You should make your plugin key the same as the Java package name you chose earlier. You should also fill in the plugin metadata.

<atlassian-plugin name='User Information' key='confluence.extra.userinfo'>
    <plugin-info>
        <description>Allows users to store personal data/contact details about themselves</description>
        <vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/>
        <version>1.0</version>
    </plugin-info>
</atlassian-plugin>

Once again, there's a template file in the Plugin Development Kit.

Compile and Upload

The plugin can now be built and installed into Confluence. I have no idea why you'd want to do it, but it's sort of necessary to come away from each step in a tutorial with some tangible evidence you've accomplished something. So here's what my new plugin looks like when I upload it into Confluence's plugin manager:

That's it. A plugin with no plugin modules. Next, we write some code!

Downloads

Labels

upt upt Delete
tutorial tutorial Delete
confluence confluence Delete
plugins plugins Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.