Versions Compared

Key

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

...

Section
show-titlefalse
titleDescription

User need to supply the following information to create a new project with the doctype:create mojo.

  • coordinates
    • groupId
    • artifactIdPrefix
    • version
  • layout
    • modelsFolder
  • keys
    • packagePrefix

The mojo cannot guess defaults for all of these values. The groupId, the artifactId, and the packagePrefix are specific to the owner of the project.

The project-settings.xml allows to specify defaults for these parameters.

...

Section
titleProject Settings

The project settings provides defaults for the creation of new doctype add-on projects for the projectdoc Toolbox.

The project settings are stored in a file names project-settings.xml which is expected to be located in the user's .m2 folder within the user home.

The XML schema for that file is defined by the

System Link
fileproject-settings-doc.html
system-typesite
checktrue
labelproject settings XSD
.

Code Block
languagexml
titleStructure of Project Settings
<?xml version='1.0'?>

<project-settings
  xmlns="http://smartics.de/xsd/projectdoc/project-settings/1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <coordinates>
    <groupId></groupId>
    <artifactIdPrefix></artifactIdPrefix>
    <version></version>
  </coordinates>

  <layout>
    <modelsFolder></modelsFolder>
  </layout>

  <keys>
    <packagePrefix></packagePrefix>
  </keys>
</project-settings>

Not all values need to be defined. There are valid defaults for version (which defines the default version for a new project) and modelsFolder (which specifies the location of the models within the project folder) that usually need not to be overridden.

Content Marker
idSample Project Settings
Code Block
languagexml
titleSample Project Settings
<?xml version='1.0'?>

<project-settings
  xmlns="http://smartics.de/xsd/projectdoc/project-settings/1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <coordinates>
    <groupId>com.mycompany.projectdoc.doctypes</groupId>
    <artifactIdPrefix>mycompany-doctype-addon-</artifactIdPrefix>
  </coordinates>

  <keys>
    <packagePrefix>com.mycompany.projectdoc.doctypes</packagePrefix>
    <organization-signature>My<organizationSignature>My Company</organization-signature>organizationSignature>
  </keys>
</project-settings>

The file is picked-up per default. Parameters specified on the command-line override the values in the project settings.

...