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 xmlns="http://maven.apache.org/PROFILES/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd"> <profiles> <profile> <id/> <activation> <activeByDefault/> <jdk/> <os> <name/> <family/> <arch/> <version/> </os> <property> <name/> <value/> </property> <file> <missing/> <exists/> </file> </activation> <properties> <key>value</key> </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>
Root element of the profiles.xml file.
Element | Type | Description |
---|---|---|
profiles/profile* | List<Profile> | (Many) Configuration of build profiles for adjusting the build according to environmental parameters |
activeProfiles/activeProfile* | List<String> | (Many) List of manually-activated build profiles, specified in the order in which they should be applied. |
Modifications to the build process which is keyed on some sort of environmental parameter.
Element | Type | Description |
---|---|---|
id | String | The ID of this build profile, for activation purposes. |
activation | Activation | The conditional logic which will automatically trigger the inclusion of this profile. |
properties/key=value* | Properties | (Many) Extended configuration specific to this profile goes here. |
repositories/repository* | List<Repository> | (Many) The lists of the remote repositories |
pluginRepositories/pluginRepository* | List<Repository> | (Many) The lists of the remote repositories for discovering plugins |
The conditions within the build runtime environment which will trigger the automatic inclusion of the parent build profile.
Element | Type | Description |
---|---|---|
activeByDefault | boolean | Flag specifying whether this profile is active as a default. Default value is: false. |
jdk | String | Specifies that this profile will be activated when a matching JDK is detected. |
os | ActivationOS | Specifies that this profile will be activated when matching OS attributes are detected. |
property | ActivationProperty | Specifies that this profile will be activated when this System property is specified. |
file | ActivationFile | Specifies that this profile will be activated based on existence of a file. |
This is an activator which will detect an operating system's attributes in order to activate its profile.
Element | Type | Description |
---|---|---|
name | String | The name of the OS to be used to activate a profile |
family | String | The general family of the OS to be used to activate a profile (e.g. 'windows') |
arch | String | The architecture of the OS to be used to activate a profile |
version | String | The version of the OS to be used to activate a profile |
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 | Type | Description |
---|---|---|
name | String | The name of the property to be used to activate a profile |
value | String | The value of the property to be used to activate a profile |
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 | Type | Description |
---|---|---|
missing | String | The name of the file that should be missing to activate a profile |
exists | String | The name of the file that should exist to activate a profile |
Repository contains the information needed for establishing connections with remote repository
Element | Type | Description |
---|---|---|
releases | RepositoryPolicy | How to handle downloading of releases from this repository |
snapshots | RepositoryPolicy | How to handle downloading of snapshots from this repository |
id | String | A unique identifier for a repository. |
name | String | Human readable name of the repository |
url | String | The url of the repository |
layout | String | The type of layout this repository uses for locating and storing artifacts - can be "legacy" or
"default". Default value is: default. |
Download policy
Element | Type | Description |
---|---|---|
enabled | boolean | Whether to use this repository for downloading this type of artifact Default value is: true. |
updatePolicy | String | The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or "never" (only if it doesn't exist locally). |
checksumPolicy | String | What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn" |
Download policy
Element | Type | Description |
---|---|---|
enabled | boolean | Whether to use this repository for downloading this type of artifact Default value is: true. |
updatePolicy | String | The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or "never" (only if it doesn't exist locally). |
checksumPolicy | String | What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn" |
Repository contains the information needed for establishing connections with remote repository
Element | Type | Description |
---|---|---|
releases | RepositoryPolicy | How to handle downloading of releases from this repository |
snapshots | RepositoryPolicy | How to handle downloading of snapshots from this repository |
id | String | A unique identifier for a repository. |
name | String | Human readable name of the repository |
url | String | The url of the repository |
layout | String | The type of layout this repository uses for locating and storing artifacts - can be "legacy" or
"default". Default value is: default. |