You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Shows how users can create their own model project for their doctypes. This involves creating a new project using a Maven Archtetype and then add blueprint based on model descriptors.
Create 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
).
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 projectdoc Toolbox is created.
Configuration
The project POM contains the configuration to create blueprint files based on the model descriptors.
<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>
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.
Create Blueprint Files
Based on the model files the following command, run from within the project (where the pom.xml
is found), creates the necessary files to make the blueprint files come to life.
After that everything is in place in your source folder of your project. You can start the Confluence server on your developer box (see next step).
Check that Everything is in Place
The next step is to start (for instance in debug mode) a local Confluence server instance with your add-on.
After the server is up, login as admin (password admin), create a new space and create a couple of pages of with your blueprints.
Resources
More information on working with the Doctypes Plugin for Maven.
More usage scenarios:
- Create a new Doctype Model
- Shows how users can create their own model project for their doctypes. This involves creating a new project using a Maven Archtetype and then add blueprint based on model descriptors.
- Create a new Doctype Add-on
- Shows how users can create their own add-on project for their doctypes. This involves creating a new project using a Maven Archtetype and then add blueprint based on model descriptors.
- Add new Doctype
- Shows how to add a new doctype to an existing project.
- Update Doctype
- Shows how to update an existing doctype.