Fork me on GitHub

slingfeature:apply-default-config

Full name:

org.apache.sling:slingfeature-maven-plugin:1.7.2:apply-default-config

Description:

This mojo applies default configurations to selected features.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: process-resources.

Required Parameters

Name Type Since Description
<features> File - Directory containing feature files
Default value is: src/main/features.
<selection> FeatureSelectionConfig - The features to apply the default configuration to.
<testFeatures> File - Directory containing test feature files.
Default value is: src/test/features.

Optional Parameters

Name Type Since Description
<configurationApiClassifier> String 1.6 Optional classifier for a feature from the local project containing the configuration api to validate against
<configurationApiDependency> Dependency 1.6 Optional feature model dependency containing the configuration api to validate against.
<enableLegacyVariableReplacement> boolean 1.3.6 Enable old variable replacement in feature model based on the full maven project including system variables. If this is enabled, enableProjectVariableReplacement and replacePropertyVariables have no effect.
Default value is: false.
<enableProjectVariableReplacement> boolean 1.3.6 Enable the replacement of variables when reading a feature model. The supported variables are "project.groupId", "project.artifactId", "project.version" and "project.osgiVersion".
Default value is: true.
<failOnValidationError> boolean - If enabled (default) the build fails if the configuration is invalid
Default value is: true.
<featuresExcludes> String - Comma separated list of excludes for the feature files. Feature files excluded by this configuration are not processed at all.
<featuresIncludes> String - Comma separated list of includes for the feature files in the configured directory. Only feature files specified by this include are processed.
Default value is: **/*.json.
<generatedFeatures> File - Directory containing generated feature files
<generatedFeaturesExcludes> String - Comma separated list of excludes for the generated feature files. Feature files excluded by this configuration are not processed at all.
<generatedFeaturesIncludes> String - Comma separated list of includes for the generated feature files in the configured directory. Only feature files specified by this include are processed.
Default value is: **/*.json.
<jarStartOrder> int - The start level for the attached jar/bundle.
<replacePropertyVariables> String 1.3.6 A comma separated list of variables which are replaced when a feature model is read. The value of these variables is fetched from the project properties.
<skipAddFeatureDependencies> boolean - If set to true the artifacts from the feature are not as dependencies to the project.
Default value is: false.
<skipAddJarToFeature> boolean - If set to true the main jar artifact is not added to the feature.
Default value is: false.
<skipAddJarToTestFeature> boolean - If set to true the main jar artifact is not added to the test feature.
Default value is: false.
<skipAddTestFeatureDependencies> boolean - If set to true the artifacts from the test feature are not as dependencies to the project.
Default value is: true.
<testFeaturesExcludes> String - Comma separated list of excludes for the test features.
<testFeaturesIncludes> String - Comma separated list of includes for the test features.
Default value is: **/*.json.
<validateFeatures> boolean - If set to true the features are validated against the JSON schema.
Default value is: true.

Parameter Details

<configurationApiClassifier>

Optional classifier for a feature from the local project containing the configuration api to validate against
  • Type: java.lang.String
  • Since: 1.6
  • Required: No

<configurationApiDependency>

Optional feature model dependency containing the configuration api to validate against.
  • Type: org.apache.maven.model.Dependency
  • Since: 1.6
  • Required: No

<enableLegacyVariableReplacement>

Enable old variable replacement in feature model based on the full maven project including system variables. If this is enabled, enableProjectVariableReplacement and replacePropertyVariables have no effect.
  • Type: boolean
  • Since: 1.3.6
  • Required: No
  • Default: false

<enableProjectVariableReplacement>

Enable the replacement of variables when reading a feature model. The supported variables are "project.groupId", "project.artifactId", "project.version" and "project.osgiVersion".
  • Type: boolean
  • Since: 1.3.6
  • Required: No
  • Default: true

<failOnValidationError>

If enabled (default) the build fails if the configuration is invalid
  • Type: boolean
  • Required: No
  • Default: true

<features>

Directory containing feature files
  • Type: java.io.File
  • Required: Yes
  • Default: src/main/features

<featuresExcludes>

Comma separated list of excludes for the feature files. Feature files excluded by this configuration are not processed at all.
  • Type: java.lang.String
  • Required: No

<featuresIncludes>

Comma separated list of includes for the feature files in the configured directory. Only feature files specified by this include are processed.
  • Type: java.lang.String
  • Required: No
  • Default: **/*.json

<generatedFeatures>

Directory containing generated feature files
  • Type: java.io.File
  • Required: No

<generatedFeaturesExcludes>

Comma separated list of excludes for the generated feature files. Feature files excluded by this configuration are not processed at all.
  • Type: java.lang.String
  • Required: No

<generatedFeaturesIncludes>

Comma separated list of includes for the generated feature files in the configured directory. Only feature files specified by this include are processed.
  • Type: java.lang.String
  • Required: No
  • Default: **/*.json

<jarStartOrder>

The start level for the attached jar/bundle.
  • Type: int
  • Required: No

<replacePropertyVariables>

A comma separated list of variables which are replaced when a feature model is read. The value of these variables is fetched from the project properties.
  • Type: java.lang.String
  • Since: 1.3.6
  • Required: No

<selection>

The features to apply the default configuration to.
  • Type: org.apache.sling.feature.maven.mojos.FeatureSelectionConfig
  • Required: Yes

<skipAddFeatureDependencies>

If set to true the artifacts from the feature are not as dependencies to the project.
  • Type: boolean
  • Required: No
  • Default: false

<skipAddJarToFeature>

If set to true the main jar artifact is not added to the feature.
  • Type: boolean
  • Required: No
  • Default: false

<skipAddJarToTestFeature>

If set to true the main jar artifact is not added to the test feature.
  • Type: boolean
  • Required: No
  • Default: false

<skipAddTestFeatureDependencies>

If set to true the artifacts from the test feature are not as dependencies to the project.
  • Type: boolean
  • Required: No
  • Default: true

<testFeatures>

Directory containing test feature files.
  • Type: java.io.File
  • Required: Yes
  • Default: src/test/features

<testFeaturesExcludes>

Comma separated list of excludes for the test features.
  • Type: java.lang.String
  • Required: No

<testFeaturesIncludes>

Comma separated list of includes for the test features.
  • Type: java.lang.String
  • Required: No
  • Default: **/*.json

<validateFeatures>

If set to true the features are validated against the JSON schema.
  • Type: boolean
  • Required: No
  • Default: true