Shows how to add a new doctype to an existing project.

The information architecture is a moving target. New requirements can call for a new document type (template) to make it easier for team members to write down the essential information that is relevant for the project.

Prerequisites

The project has been created using the Doctype Archtetype. See Create a new Doctype Add-on for details.

 

The following command will change your source files and if you applied any changes to the project created with the archetype, then make sure you have a backup of these files!

You cannot rollback the changes!

We recommend to have your project in version control (for instance with Bitbucket or GitHub) and run this command only on files you have updated and no local changes. If anything goes wrong - for whatever reasons - you can easily restore your previous work from the repository.

Add Doctype Descriptor

The folder

src/main/resources/projectdoc-models

contains all descriptors. Descriptors for doctypes are stored in

src/main/resources/projectdoc-models/doctypes

To add a new doctype, simply add a new descriptor file. The plugin will automatically find all descriptors in the next run and create the corresponding blueprint files.

Run Generation Process

The generation process is run from within the project (that is from the base folder that contains the pom.xml file) using

mvn doctype:generate

All information is derived from the configuration in the pom.xml file that has been created by the Doctypes Archetype.

      <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>

In create mode (default), already existing templates will not be overridden.

Resources

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.
Update Doctype
Shows how to update an existing doctype.