Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleCreate new Project

First create a new project using the Doctype Add-on Archetype. The interface to use the archetype is simplified by the create model mojo. So we recommend to use the following command on the commandline. This reduces the number of parameters you have to specify to one (shortId), also it is recommended to also provide a name for the new project (projectName) and a description (projectDescription).

Code Block
languagetext
mvn doctype:create-model -DcreateExamples=false -DshortId=myshortid 
  -DprojectName="My Doctype Add-on" 
  -DprojectDescription="Description of my project."

Specify a short ID (only characters, digits allowed except as first char) and an optional project name and description (which is recommended). With that a project based on Maven for the model for the PDAC1 is created.

Add the projectdoc models and then create the doctype add-on project and launch it in a Confluence server.

Code Block
languagetext
mvn clean package doctype:run
Section
titleConfiguration

The project POM contains the configuration to create blueprint files based on the model descriptors.

Content Marker
idPlugin Configuration
Code Block Placeholder
code-languageHTML and XML
      <plugin>
        <groupId>${project.groupId}</groupId>
        <artifactId>${project.artifactId}</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>doctype</id>
            <goals>
              <goal>generate</goal>
            </goals>
            <phase>generate-resources</phase>
          </execution>
        </executions>
        <configuration>
          <shortId>myshortid</shortId>
        </configuration>
      </plugin>

So the next step is to provide the model descriptors. There are basically there models: add-on, spaces, and doctypes. All descriptors are XML files stored in

src\main\resources\projectdoc-models

spaces are stored in a subfolder spaces, doctypes in a subfolder doctypes.

The createExamples flag is set true by default. So there are some sample files to start with describing your model.

...