Shows how to update an existing doctype.

Changes to existing doctypes can also be applied to the model descriptor. Valid changes currently only includes the adding of properties and sections to doctype descriptors.

 

These elements may also be removed, but will leave unused elements in some files. These unused elements do not have any impact on the runtime environment.

So there is some manual work involved at the current development stage of the plugin to clean these changes.

Prerequisites

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

The model descriptors have already been established. See Add new Doctype 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.


Apply Changes to Doctype Descriptor

The folder

src/main/resources/projectdoc-models/doctypes

contains all descriptors for doctypes.

Run Generation Process

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

mvn doctype:generate -Dmode=update

In create mode (default), already existing templates will not be overridden. but update will take care of updating doctype information.

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.
Add new Doctype
Shows how to add a new doctype to an existing project.