

- #Totalspaces default number of spaces how to#
- #Totalspaces default number of spaces update#
- #Totalspaces default number of spaces upgrade#

(You may need to expand the import statements if they are collapsed in your source view.) Replace the existing import statements with the following. In Eclipse or from the command line, open the ExampleMacro.java file at the following directory path: src/main/java/com/example/plugins/tutorial/confluence/TutorialMacro.
#Totalspaces default number of spaces update#
Update importsīefore we implement the macro logic, we'll make some preliminary changes to the generated ExampleMacro class. Once you're comfortable with the process, you can use the same steps to create a macro to do pretty much anything. In this example, we are writing a simple Confluence macro that greets the user by name and displays the total number of spaces in the instance, along with the home page title and creator of a randomly chosen space. Now you will write some code that will make your plugin do something. You have already generated the stubs for your plugin modules. The POM (Project Object Model definition file) is located at the root of your project and declares the project dependencies and other information.Įdit the pom.xml file in the root folder of your plugin.Īdd a description of your macro to the following element: Open your plugin project in Eclipse and follow along with the next sections. In this section, we'll modify information about your plugin and check the product version value. It's a good idea to familiarise yourself with the initial project files. Your Atlassian plugin folder should appear under Projects.Įclipse imports your project. Press Next and enter the root directory of your workspace. To clone the repository, issue the following command:Ĭhange to the TutorialMacro directory created by the previous step.įilter for Existing Projects into Workspace (or expand the General folder tree). Bitbucket serves a public Git repository containing the tutorial's code. If you want to skip ahead or check your work when you are done, you can find the plugin source code on Atlassian Bitbucket. We encourage you to work through this tutorial. In addition, have a look at Enabling XSS Protection in Plugins, as it has been updated since AtlasCamp 2010. Since all plugin code is essentially injected into the Confluence executable, we recommend that you review an AtlasCamp 2010 presentation Securing your plugin before proceeding.
#Totalspaces default number of spaces how to#
#Totalspaces default number of spaces upgrade#
For more information, see Plugin Development Upgrade FAQ for 4.0.

Some legacy 3.x plugins will need to be modified in order to work in 4.x. For a tutorial on creating 4.x version plugins, see Creating a New Confluence Macro.Īlso, this plugin happens to work in both 3.x and 4.x versions of Confluence. A difference particularly relevant to macro development is the introduction of the XHTML-based output format. There are many differences between 3.x and 4.x plugins. This tutorial shows how to build a pre-4.0 macro plugin.
