slingfeature:apis-jar

Full name:

org.apache.sling:slingfeature-maven-plugin:1.2.0:apis-jar

Description:

Generates the APIs JARs for the selected feature files.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
<features> File - Directory containing feature files
Default value is: src/main/features.
<testFeatures> File - Directory containing test feature files.
Default value is: src/test/features.

Optional Parameters

Name Type Since Description
<apiClassifierMappings> Map - Mapping for the feature classifier to a user defined name
<apiJavadocResources> List - Additional resources for the api javadoc jar
<apiRegionNameMappings> Map - Mapping for an api region name to a user defined name
<apiResources> List - Additional resources for the api jar
<apiSourceResources> List - Additional resources for the api source jar
<apiVersion> String 1.2.0 Optional version to be put into the manifest of the created jars
<attachApiJars> boolean - If enabled, the created api jars will be attached to the project
Default value is: true.
<excludeRegions> Set - Names of the regions to exclude, by default no regions is excluded.
<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.
<generateApiJar> boolean - Generate api jar
Default value is: true.
<generateJavadocJar> boolean - Generate the javadoc jar
Default value is: true.
<generateSourceJar> boolean - Generate the sources jar
Default value is: true.
<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.
<ignoreJavadocErrors> boolean - Ignore errors in javadoc generation
Default value is: false.
<includeRegions> Set - Names of the regions to include, by default all regions are included.
Default value is: *.
<includeResources> String[] - Patterns identifying which resources to include from bundles. This can be used to include files like license or notices files. Starting with version 1.2.0 these files are only searched in the folders mentioned by #resourceFolders
<incrementalApis> boolean - If set to true and api jars are created for more than one region, then the higher region only gets the difference to the lower region. If set to false each api jar gets the full region information (duplicating information)
Default value is: true.
<jarStartOrder> int - The start level for the attached jar/bundle.
<javadocLinks> String[] - List of javadoc links used in the javadoc generation.
<javadocSourceLevel> String - (no description)
Default value is: 8.
<licenseDefaults> List 1.2.0 A artifact patterns to match artifacts without a license. Follows the pattern "groupId:artifactId:type:classifier:version". After the patter a "=" followed by the license information needs to be specified. This information is used in the license report if no license is specified for an artifact.
<licenseReport> String 1.2.0 Create a license report file. This is the name of that file within the jar
<licenseReportFooter> String 1.2.0 Footer added at the bottom of the license report
<licenseReportHeader> String 1.2.0 Header added on top of the license report
Default value is: This archive contains files from the following artifacts:.
<resourceFolders> String 1.2.0 Comma separated list of folders where files are renamed.
Default value is: META-INF,SLING-INF.
<selection> FeatureSelectionConfig - Select the features for api generation. Separate api jars will be generated for each feature.
<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

<apiClassifierMappings>

Mapping for the feature classifier to a user defined name
  • Type: java.util.Map
  • Required: No

<apiJavadocResources>

Additional resources for the api javadoc jar
  • Type: java.util.List
  • Required: No

<apiRegionNameMappings>

Mapping for an api region name to a user defined name
  • Type: java.util.Map
  • Required: No

<apiResources>

Additional resources for the api jar
  • Type: java.util.List
  • Required: No

<apiSourceResources>

Additional resources for the api source jar
  • Type: java.util.List
  • Required: No

<apiVersion>

Optional version to be put into the manifest of the created jars
  • Type: java.lang.String
  • Since: 1.2.0
  • Required: No

<attachApiJars>

If enabled, the created api jars will be attached to the project
  • Type: boolean
  • Required: No
  • Default: true

<excludeRegions>

Names of the regions to exclude, by default no regions is excluded.
  • Type: java.util.Set
  • Required: No

<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

<generateApiJar>

Generate api jar
  • Type: boolean
  • Required: No
  • Default: true

<generateJavadocJar>

Generate the javadoc jar
  • Type: boolean
  • Required: No
  • Default: true

<generateSourceJar>

Generate the sources jar
  • Type: boolean
  • Required: No
  • Default: true

<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

<ignoreJavadocErrors>

Ignore errors in javadoc generation
  • Type: boolean
  • Required: No
  • Default: false

<includeRegions>

Names of the regions to include, by default all regions are included.
  • Type: java.util.Set
  • Required: No
  • Default: *

<includeResources>

Patterns identifying which resources to include from bundles. This can be used to include files like license or notices files. Starting with version 1.2.0 these files are only searched in the folders mentioned by #resourceFolders
  • Type: java.lang.String[]
  • Required: No

<incrementalApis>

If set to true and api jars are created for more than one region, then the higher region only gets the difference to the lower region. If set to false each api jar gets the full region information (duplicating information)
  • Type: boolean
  • Required: No
  • Default: true

<jarStartOrder>

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

<javadocLinks>

List of javadoc links used in the javadoc generation.
  • Type: java.lang.String[]
  • Required: No

<javadocSourceLevel>

(no description)
  • Type: java.lang.String
  • Required: No
  • Default: 8

<licenseDefaults>

A artifact patterns to match artifacts without a license. Follows the pattern "groupId:artifactId:type:classifier:version". After the patter a "=" followed by the license information needs to be specified. This information is used in the license report if no license is specified for an artifact.
  • Type: java.util.List
  • Since: 1.2.0
  • Required: No

<licenseReport>

Create a license report file. This is the name of that file within the jar
  • Type: java.lang.String
  • Since: 1.2.0
  • Required: No

<licenseReportFooter>

Footer added at the bottom of the license report
  • Type: java.lang.String
  • Since: 1.2.0
  • Required: No

<licenseReportHeader>

Header added on top of the license report
  • Type: java.lang.String
  • Since: 1.2.0
  • Required: No
  • Default: This archive contains files from the following artifacts:

<resourceFolders>

Comma separated list of folders where files are renamed.
  • Type: java.lang.String
  • Since: 1.2.0
  • Required: No
  • Default: META-INF,SLING-INF

<selection>

Select the features for api generation. Separate api jars will be generated for each feature.
  • Type: org.apache.sling.feature.maven.mojos.FeatureSelectionConfig
  • Required: No

<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