slingstart:package

Full name:

org.apache.sling:slingstart-maven-plugin:1.9.12:package

Description:

Create a Sling quickstart package (either JAR or WAR) based on the referenced model.

Attributes:

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

Optional Parameters

Name Type Since Description
<allowUnresolvedPomDependencies> boolean - If set to true, an exception is throws when "usePomDependencies" is set to true and some dependency version could not be resolved in the Maven POM.
Default value is: false.
<attachArtifact> boolean - If set to false does not attach the generated artifact to Maven. This setting takes only effect if the packaging of the current Maven project is not slingstart. Otherwise the generated artifact is always the main artifact (and is therefore always attached).
Default value is: true.
<createWebapp> boolean - If set to true creates a WAR artifact in addition to the standalone JAR from the model.
Default value is: false.
<disableExtendingMavenClasspath> boolean - If set to true the Maven classpath (either scope "provided" or "test") will not be extended by the artifacts being referenced in the model.

This parameter is evaluated in the ModelPreprocessor, i.e. outside of the Mojo execution therefore it must not be configured within an execution tag but rather in the global configuration section for this plugin.


<model> String 1.3 Inlined model. Is processed first and afterwards merged with any model found in modelDirectory.

This parameter is evaluated in the ModelPreprocessor, i.e. outside of the Mojo execution therefore it must not be configured within an execution tag but rather in the global configuration section for this plugin.


<modelDirectory> File - The model directory containing the provision models. This parameter is evaluated in the DependencyLifecycleParticipant. As default first ${basedir}/src/main/provisioning and then ${basedir}/src/test/provisioning is used (in case the former does not exist).

This parameter is evaluated in the ModelPreprocessor, i.e. outside of the Mojo execution therefore it must not be configured within an execution tag but rather in the global configuration section for this plugin.


Default value is: ${basedir}/src/main/provisioning.
<modelPattern> String - The model file name pattern to consider.

This parameter is evaluated in the ModelPreprocessor, i.e. outside of the Mojo execution therefore it must not be configured within an execution tag but rather in the global configuration section for this plugin.


Default value is: ((.*)\.txt|(.*)\.model).
<usePomDependencies> boolean - If set to true, Artifact dependencies from provisioning file without explicit version are tried to be resolved against the versions given in the Maven POM. The following sections in the effective pom are considered during resolving the version:
  1. The project's artifact itself
  2. The project's dependencies
  3. The project's dependencyManagement

Default value is: false.
<usePomVariables> boolean - If set to true, properties from the Maven POM can be used as variables in the provisioning files. The resolved variables are added to the generated provisioning file, so other tools using this model do not have to resolve them themselves.
Default value is: false.

Parameter Details

<allowUnresolvedPomDependencies>

If set to true, an exception is throws when "usePomDependencies" is set to true and some dependency version could not be resolved in the Maven POM.
  • Type: boolean
  • Required: No
  • Default: false

<attachArtifact>

If set to false does not attach the generated artifact to Maven. This setting takes only effect if the packaging of the current Maven project is not slingstart. Otherwise the generated artifact is always the main artifact (and is therefore always attached).
  • Type: boolean
  • Required: No
  • Default: true

<createWebapp>

If set to true creates a WAR artifact in addition to the standalone JAR from the model.
  • Type: boolean
  • Required: No
  • Default: false

<disableExtendingMavenClasspath>

If set to true the Maven classpath (either scope "provided" or "test") will not be extended by the artifacts being referenced in the model.

This parameter is evaluated in the ModelPreprocessor, i.e. outside of the Mojo execution therefore it must not be configured within an execution tag but rather in the global configuration section for this plugin.

  • Type: boolean
  • Required: No

<model>

Inlined model. Is processed first and afterwards merged with any model found in modelDirectory.

This parameter is evaluated in the ModelPreprocessor, i.e. outside of the Mojo execution therefore it must not be configured within an execution tag but rather in the global configuration section for this plugin.

  • Type: java.lang.String
  • Since: 1.3
  • Required: No

<modelDirectory>

The model directory containing the provision models. This parameter is evaluated in the DependencyLifecycleParticipant. As default first ${basedir}/src/main/provisioning and then ${basedir}/src/test/provisioning is used (in case the former does not exist).

This parameter is evaluated in the ModelPreprocessor, i.e. outside of the Mojo execution therefore it must not be configured within an execution tag but rather in the global configuration section for this plugin.

  • Type: java.io.File
  • Required: No
  • Default: ${basedir}/src/main/provisioning

<modelPattern>

The model file name pattern to consider.

This parameter is evaluated in the ModelPreprocessor, i.e. outside of the Mojo execution therefore it must not be configured within an execution tag but rather in the global configuration section for this plugin.

  • Type: java.lang.String
  • Required: No
  • Default: ((.*)\.txt|(.*)\.model)

<usePomDependencies>

If set to true, Artifact dependencies from provisioning file without explicit version are tried to be resolved against the versions given in the Maven POM. The following sections in the effective pom are considered during resolving the version:
  1. The project's artifact itself
  2. The project's dependencies
  3. The project's dependencyManagement
  • Type: boolean
  • Required: No
  • Default: false

<usePomVariables>

If set to true, properties from the Maven POM can be used as variables in the provisioning files. The resolved variables are added to the generated provisioning file, so other tools using this model do not have to resolve them themselves.
  • Type: boolean
  • Required: No
  • Default: false