NOW LOADING

Your dev environment

To develop plugins, you will need to install Maven or the Atlassian SDK

Install Maven

Install Maven. We use Maven 3.6.2. Some people already have Atlassian’s SDK, which is good too.

Add our repositories in your settings.xml

This file is provided by Maven and is normally located in ~/.m2/settings.xml, but if you are using the Atlassian SDK, it may be located somewhere else:

mvn -X | grep settings # To display the location of your settings.xml

In your settings.xml, set the repositories. Example:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

    <servers>
        <server>
            <!-- Declaring the passwords for the servers named 'playsql.general' -->
            <id>playsql.general</id>
            <username>external1</username>
            <password>external1</password>
        </server>
    </servers>

    <profiles>
        <profile>
            <id>defaultProfile</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

            <repositories>
                <!-- This one is already present in your settings.xml -->
                <repository>
                    <id>atlassian-public</id>
                    <url>https://maven.atlassian.com/repository/public</url>
                    <snapshots>
                        <enabled>true</enabled>
                        <updatePolicy>never</updatePolicy>
                        <checksumPolicy>warn</checksumPolicy>
                    </snapshots>
                    <releases>
                        <enabled>true</enabled>
                        <checksumPolicy>warn</checksumPolicy>
                    </releases>
                </repository>
                <repository>
                    <!-- This one is already present in your settings.xml -->
                    <id>atlassian-plugin-sdk</id>
                    <url>file://${env.ATLAS_HOME}/repository</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                    <releases>
                        <enabled>true</enabled>
                        <checksumPolicy>warn</checksumPolicy>
                    </releases>
                </repository>
                <repository>
                    <!-- Insert this one -->
                    <id>playsql.general</id>
                    <url>https://maven.dev.requirementyogi.com/repository/general</url>
                    <snapshots>
                        <enabled>true</enabled>
                        <updatePolicy>daily</updatePolicy>
                        <checksumPolicy>warn</checksumPolicy>
                    </snapshots>
                    <releases>
                        <enabled>true</enabled>
                        <updatePolicy>daily</updatePolicy>
                        <checksumPolicy>warn</checksumPolicy>
                    </releases>
                </repository>
            </repositories>

            <pluginRepositories>
                <pluginRepository>
                    <!-- This one is already present in your settings.xml -->
                    <id>atlassian-public</id>
                    <url>https://maven.atlassian.com/repository/public</url>
                    <releases>
                        <enabled>true</enabled>
                        <checksumPolicy>warn</checksumPolicy>
                    </releases>
                    <snapshots>
                        <updatePolicy>never</updatePolicy>
                        <checksumPolicy>warn</checksumPolicy>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <!-- This one is already present in your settings.xml -->
                    <id>atlassian-plugin-sdk</id>
                    <url>file://${env.ATLAS_HOME}/repository</url>
                    <releases>
                        <enabled>true</enabled>
                        <checksumPolicy>warn</checksumPolicy>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <!-- Insert this one -->
                    <id>playsql.general</id>
                    <url>https://maven.dev.requirementyogi.com/repository/general</url>
                    <snapshots>
                        <enabled>true</enabled>
                        <updatePolicy>daily</updatePolicy>
                        <checksumPolicy>warn</checksumPolicy>
                    </snapshots>
                    <releases>
                        <enabled>true</enabled>
                        <updatePolicy>never</updatePolicy>
                        <checksumPolicy>warn</checksumPolicy>
                    </releases>
                </pluginRepository>
            </pluginRepositories>
            <properties>
                <downloadSources>true</downloadSources>
                <downloadJavadocs>true</downloadJavadocs>
            </properties>
        </profile>
    </profiles>

    <pluginGroups>
        <!-- The Atlassian maven plugins group used for all Atlassian Maven plugins -->
        <pluginGroup>com.atlassian.maven.plugins</pluginGroup>
    </pluginGroups>
</settings>

That’s it, you should be good to go.

How to start Confluence?

If you’ve created your own plugin or cloned https://bitbucket.org/playsql/extensions-reqif, you can launch Confluence using the standard command of the Atlassian SDK:

# Ensure you are in the same directory as the pom.xml, then execute:
mvn amps:debug # It creates a directory for Confluence and Tomcat in the ./target/ directory

Confluence watches file modifications in all target directories. To reinstall the plugin after doing some modifications, just recompile in another terminal:

mvn install # Don't use `clean` because it would erase the data of Confluence (unless you want it to)