This page last changed on Sep 26, 2006 by jnolen.
This guide assumes you have set up IDEA and have

Now that we have our web application project and our plugin projects set up, we need to connect them together. The good news is, most of the hard work has been done now.

Adding a plugin

1. Open up your main Confluence project in IDEA. Your project should look something like this:
2. Now we add the plugin project you just created. First, select 'File > New Module'.  
3. Select the 'Create new module' option and click next.  
4. In 'Module Content Root', select to the root direcotry for the plugin.
5. After continuing, the module should now have been added to your main project.

Checking the plugin settings

Next, we check that the plugin was actually generated correctly by atlassian-idea. Right-click on your new plugin module and select 'Module Settings'. We'll check through the tabs one-by-one.

Paths: In addition to the java/src/ path, you should add java/etc/. Your source paths look something like this:
Libraries (Classpath): If your JDK is labeld 'Invalid', you need to select a JDK for your project (it should be the same one used by the main Confluence Module.
Dependencies: Make sure that your plugin depends on the 'confluence' module.
Order/Export: No changes here.  
JavaDoc: This one stays as-is.  

Linking the plugin to Confluence

So far, the plugin should compile nicely, but it won't actually be hooked into Confluence if you run it in Tomcat (or your chosen application server). Let's set that up.

  1. Open the Module Settings for the 'tomcat_env' project (Or your application server) and switch to Dependencies.
  2. Select your new plugin as a dependency.

Building and Testing your Plugin

Now, you just need to develop your plugin. Once you have some code to test, do the following:

  1. Start 'Build > Make Project'. This will put the necessary files into the webapp, ready to run, including your plugin source code.
  2. Run the server ('Run > Run') or set some break-points and debug it ('Run > Debug').

What Next?

Now it's up to you to biuld something cool. Take a look at our plugin guide to see what the possibilities are.

Once you've completed your plugin, it's time to package it for distribution.


copy_jar.png (image/png)
confluence_dependencies.png (image/png)
confluence_dependencies.png (image/png)
broken_source.png (image/png)
broken_jdk.png (image/png)
basic_project.png (image/png)
plugin_project.png (image/png)
plugin_project.png (image/png)
paths.png (image/png)
import_module.png (image/png)
import_module.png (image/png)
import_module.png (image/png)
extra_settings.png (image/png)
extra_jars.png (image/png)
confluence_settings.png (image/png)
tomcat_dependencies.png (image/png)

I get errors like

package com.atlassian.confluence.core does not exist

package com.atlassian.renderer.v2 does not exist

Posted by chackob at Dec 04, 2006 15:46
Document generated by Confluence on Mar 22, 2007 21:01