You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

 

The project-settings.xml allows user specific defaults for parameter values used for the project creation process.

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

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

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

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

Project 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 project settings XSD.

Structure 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>
    <packagePathPrefix></packagePathPrefix>
  </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.

Sample 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>
    <packagePathPrefix>com.mycompany.projectdoc.doctypes.</packagePathPrefix>
    <organization-signature>My Company</organization-signature>
  </keys>
</project-settings>

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

  • No labels