Build Descriptors (definitions)

Note:

The term build definition may appear in the portal user interface. It refers to build descriptor as described in this topic.

Descriptors are configured in the file .polarion/builder/descriptors.xml. You can configure build descriptors in both the global scope, and per project. These are merged if necessary. Here is an example of a build descriptor:

<?xml version="1.0" encoding="UTF-8"?>
<descriptors xmlns="http://polarion.com/schema/Builder/Descriptors"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  xsi:schemaLocation="http://polarion.com/schema/Builder/Descriptors">
  <!-- no name and "_default" are equal -->
  <descriptor name="NAME">
    <!-- may be omitted -->
    <artifacts>
      <artifact>
        <!-- if id ends with "*" then the given prefix is searched for; default value is "*" -->
        <groupId>GROUP_ID</groupId>
        <!-- if id ends with "*" then the given prefix is searched for; default value is "*" -->
        <artifactId>ARTIFACT_ID</artifactId>
      </artifact>
      ... <artifact> ...
    </artifacts>
    <!-- may be omitted -->
    <build>
      <properties>
        <PROPERTY_NAME>PROPERTY_VALUE</PROPERTY_NAME>
        ...
      </properties>
    </build>
    <!-- may be omitted -->
    <deploy>
       <!-- includes and excludes may be omitted, default value for defaultexcludes is true -->
       <copy|move todir="TARGET_DIRECTORY" label="LABEL_FOR_BUILD_REPORT"
         dir="SOURCE_DIRECTORY" includes="INCLUDES_PATTERN"
         excludes="EXCLUDES_PATTERN" defaultexcludes="USE_DEFAULT_EXCLUDES_TRUE_OR_FALSE">
       ... <copy|move> ...
       <item todir="TARGET_DIRECTORY" label="LABEL_FOR_BUILD_REPORT" name="ITEM_NAME" />
       ... <item> ...
    </deploy>
  </descriptor>
  ... <descriptor> ...
</descriptors>  
Warning:

Usage of <move> or move in <deploy> should be used with caution. It can fail depending on operating system, file system and whether BIR is on the same file system/volume/disk as the data folder. It is also not possible to combine more deployments whose sources are on the same path. Generally, the move feature should be used with care and only if necessary due to storage space or performance reasons.

Descriptors are attached to all build artifacts which match a given group and artifact IDs (or all if <artifacts> is omitted). There could be two different descriptors with same name attached to different artifacts.

There is always one default build descriptor named _default which simply runs a build and deploys it to BIR (linked from the build report) data produced by Maven 2. This default descriptor can be overridden by a descriptor with the same name (or nameless).

In <deploy> tags includes, excludes and default excludes are the same as in Ant (see http://ant.apache.org/manual/CoreTypes/fileset.html for more information).

There is only one deploy item supported for build artifacts of type maven2: default, which will deploy all files produced by a Maven 2 build (stored in target directory).