Profiles

Project-local overrides to the build process based on detected or user-provided environmental parameters. This is the model specification for ${basedir}/profiles.xml.

<profilesXml>
  <profiles>
    <profile>
      <id/>
      <activation>
        <activeByDefault/>
        <jdk/>
        <os>
          <name/>
          <family/>
          <arch/>
          <version/>
        </os>
        <property>
          <name/>
          <value/>
        </property>
        <file>
          <missing/>
          <exists/>
        </file>
      </activation>
      <properties/>
      <repositories>
        <repository>
          <releases>
            <enabled/>
            <updatePolicy/>
            <checksumPolicy/>
          </releases>
          <snapshots>
            <enabled/>
            <updatePolicy/>
            <checksumPolicy/>
          </snapshots>
          <id/>
          <name/>
          <url/>
          <layout/>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <releases>
            <enabled/>
            <updatePolicy/>
            <checksumPolicy/>
          </releases>
          <snapshots>
            <enabled/>
            <updatePolicy/>
            <checksumPolicy/>
          </snapshots>
          <id/>
          <name/>
          <url/>
          <layout/>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <activeProfiles/>
</profilesXml>

profilesXml

Root element of the profiles.xml file.

Element Description
profiles Configuration of build profiles for adjusting the build according to environmental parameters
activeProfiles List of manually-activated build profiles, specified in the order in which they should be applied.

profile

Modifications to the build process which is keyed on some sort of environmental parameter.

Element Description
id The ID of this build profile, for activation purposes.
activation The conditional logic which will automatically trigger the inclusion of this profile.
properties Extended configuration specific to this profile goes here.
repositories The lists of the remote repositories
pluginRepositories The lists of the remote repositories for discovering plugins

activation

The conditions within the build runtime environment which will trigger the automatic inclusion of the parent build profile.

Element Description
activeByDefault Flag specifying whether this profile is active as a default. The default value is false.
jdk Specifies that this profile will be activated when a matching JDK is detected.
os Specifies that this profile will be activated when matching OS attributes are detected.
property Specifies that this profile will be activated when this System property is specified.
file Specifies that this profile will be activated based on existence of a file.

os

This is an activator which will detect an operating system's attributes in order to activate its profile.

Element Description
name The name of the OS to be used to activate a profile
family The general family of the OS to be used to activate a profile (e.g. 'windows')
arch The architecture of the OS to be used to activate a profile
version The version of the OS to be used to activate a profile

property

This is the property specification used to activate a profile. If the value field is empty, then the existence of the named property will activate the profile, otherwise it does a case-sensitive match against the property value as well.

Element Description
name The name of the property to be used to activate a profile
value The value of the property to be used to activate a profile

file

This is the file specification used to activate a profile. The missing value will be a the location of a file that needs to exist, and if it doesn't the profile must run. On the other hand exists will test for the existence of the file and if it is there will run the profile.

Element Description
missing The name of the file that should be missing to activate a profile
exists The name of the file that should exist to activate a profile

repository

Repository contains the information needed for establishing connections with remote repoistory

Element Description
releases How to handle downloading of releases from this repository
snapshots How to handle downloading of snapshots from this repository
id A unique identifier for a repository.
name Human readable name of the repository
url The url of the repository
layout The type of layout this repository uses for locating and storing artifacts - can be "legacy" or "default". The default value is default.

releases

Download policy

Element Description
enabled Whether to use this repository for downloading this type of artifact The default value is true.
updatePolicy The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or "never" (only if it doesn't exist locally).
checksumPolicy What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn"

snapshots

Download policy

Element Description
enabled Whether to use this repository for downloading this type of artifact The default value is true.
updatePolicy The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or "never" (only if it doesn't exist locally).
checksumPolicy What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn"

pluginRepository

Repository contains the information needed for establishing connections with remote repoistory

Element Description
releases How to handle downloading of releases from this repository
snapshots How to handle downloading of snapshots from this repository
id A unique identifier for a repository.
name Human readable name of the repository
url The url of the repository
layout The type of layout this repository uses for locating and storing artifacts - can be "legacy" or "default". The default value is default.

releases

Download policy

Element Description
enabled Whether to use this repository for downloading this type of artifact The default value is true.
updatePolicy The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or "never" (only if it doesn't exist locally).
checksumPolicy What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn"

snapshots

Download policy

Element Description
enabled Whether to use this repository for downloading this type of artifact The default value is true.
updatePolicy The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or "never" (only if it doesn't exist locally).
checksumPolicy What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn"