Versions Compared

Key

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

...

Section
titleCreate new Project
Note Box

We recommend to create a model project and create the add-on project based on the models provided in that project. But in case you are not interested in models and you are only interested to create a project to get going, this is what you are looking for.

First create a new project with the use of the Doctype Add-on Archetype. The interface to use the archetype is simplified by the create 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).

Code Block
languagetext
mvn doctype:create -DshortId=myshortid -DprojectName="My Doctype Add-on"

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

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.

...