The plugin is part of a development process. Therefore there are some prerequisites to get started.

Audience
Level of Experience

Using the Doctypes Maven Plugin to create doctypes for the projectdoc Toolbox requires expertise in a number of fields.

Confluence

Users need also know how page and space blueprints for Confluence work.

The plugin does not support many details in dealing with them, so expect to be opening the atlassian-plugin.xml, JavaScript, CSS, and Soy files.

Maven

We assume readers are familiar with Maven, especially POM files and the concept of archetypes.

License Plugin

Since the license plugin for maven is configured with the generated POM file, you need to apply license file headers (mvn initialize license:format) before running mvn install.

Maven Settings

To run the short form of commands shown in this usage scenario, the plugin group de.smartics.maven.plugin needs to be registered in the Maven Settings file.

<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">
  <pluginGroups>
    ...
    <pluginGroup>de.smartics.maven.plugin</pluginGroup>
    ...
  </pluginGroups>
</settings>

Atlassian SDK

You also need to have the Atlassian Software Development Kit (SDK) and to know how to work with it.

Atlassian Artifact Server

This includes access to the Atlassian artifact server since the POM file declares dependencies to Atlassian artifacts.

Access Maven Plugin

The Doctypes Maven Plugin (and the archetype it uses) is available on the public smartics Artifact server.

de.smartics.maven.plugin:doctype-maven-plugin:1.9.4
<plugin>
  <groupId>de.smartics.maven.plugin</groupId>
  <artifactId>doctype-maven-plugin</artifactId>
  <version>1.9.4</version>
</plugin>
This is a typical configuration:

      <plugin>
        <groupId>de.smartics.maven.plugin</groupId>
        <artifactId>doctype-maven-plugin</artifactId>
        <version>1.9.4</version>
        <executions>
          <execution>
            <id>doctype</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <phase>generate-resources</phase>
          </execution>
        </executions>
        <configuration>
          <shortId>myshortid</shortId>
        </configuration>
      </plugin>

There is no need (and we discourage) to employ the archetype directly (use doctype:create). But here are the coordinates to search the artifact on our artifact repository:

<groupId>de.smartics.atlassian.confluence</groupId>
<artifactId>smartics-projectdoc-doctype-addon-archetype</artifactId>
<version>1.0.0</version>

projectdoc Artifacts

You'll also need to manually install the projectdoc artifacts to your local artifact repository. This may be an internal artifact server.

To actually compile and start the project, you need to have the references artifacts on your artifact repository. Access to Atlassian's artifacts should already been configured when you have installed the Atlassian SDK.

You need to download the projectdoc artifacts and install them manually since they are currently not available on a public repository.

Here are the coordinates of the compile time dependency (download trial version of the projectdoc Toolbox from the Atlassian Marketplace).

    <dependency>
      <groupId>de.smartics.atlassian.confluence</groupId>
      <artifactId>smartics-projectdoc-confluence</artifactId>
      <version>2.4.0</version>
    </dependency>

And this is the additional runtime dependency (download free version of the projectdoc Core Blueprints Add-on from the Atlassian Marketplace).

<pluginArtifact>
  <groupId>de.smartics.atlassian.confluence</groupId>
  <artifactId>smartics-projectdoc-confluence-space-core</artifactId>
  <version>11.1.0</version>
</pluginArtifact>

Plugin Configuration

The project settings allow to specify defaults (for instance groupId and artifactIdPrefix) for the creation of new projects.

It is recommended to store the organization specific defaults in that file.