Fork me on GitHub

hpi:hpi

Full name:

org.jenkins-ci.tools:maven-hpi-plugin:3.54-SNAPSHOT:hpi

Description:

Build a war/webapp.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: runtime.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Since version: 3.0.
  • Binds by default to the lifecycle phase: package.

Optional Parameters

Name Type Since Description
<archive> MavenArchiveConfiguration - The maven archive configuration to use.
<classesDirectory> File - The directory containing generated classes.
Default: ${project.build.outputDirectory}
<compatibleSinceVersion> String - Optional - the oldest version of this plugin which the current version is configuration-compatible with.
See also: Mark a new plugin version as incompatible with older versions
User Property: hpi.compatibleSinceVersion
<containerConfigXML> File - The path to the context.xml file to use.
Default: ${maven.war.containerConfigXML}
<dependentWarExcludes> String - The comma separated list of tokens to exclude when doing a way overlay.
<dependentWarIncludes> String - The comma separated list of tokens to include when doing a war overlay.
Default: **
<failOnVersionOverrideToDifferentRelease> boolean 2.4 Controls the safety check that prevents a snapshotPluginVersionOverride from switching to a different release version.
Default: true
<filters> List<String> - No description.
Default: ${project.build.filters}
<hpiName> String - The name of the generated hpi.
Default: ${project.build.finalName}
<jarClassifier> String 1.115 The classifier to use when searching for the jar artifact.
<jenkinsCoreId> String 1.65 Optional string that represents "groupId:artifactId" of Jenkins core jar. If left unspecified, the default groupId/artifactId pair for Jenkins is looked for.
<jenkinsCoreVersionOverride> String - Optional string that represents the version of Jenkins core to report plugins as requiring. This parameter is only used when unbundling functionality from Jenkins core and the version specified will be ignored if older than the autodetected version.
<maskClasses> String - [ws|tab|CR|LF]+ separated list of package prefixes that your plugin doesn't want to see from the core.

Tokens in this list is prefix-matched against the fully-qualified class name, so add "." to the end of each package name, like "com.foo. com.bar."

<minimumJavaVersion> String -
Deprecated.
removed without replacement

Specify the minimum version of Java that this plugin requires.
<outputDirectory> String - The directory for the generated WAR.
Default: ${project.build.directory}
<pluginFirstClassLoader> boolean 1.53 Change the classloader preference such that classes locally bundled in this plugin will take precedence over those that are defined by the dependency plugins.

This is useful if the plugins that you want to depend on exposes conflicting versions of the libraries you are using, but enabling this switch makes your code susceptible to classloader constraint violations.

<pluginName> String - Name of the plugin that Jenkins uses for display purpose. It should be one line text.
Default: ${project.name}
<pluginVersionDescription> String - Additional information that accompanies the version number of the plugin. Useful to distinguish snapshot builds. For example, if you are building snapshot plugins from Jenkins, you can put the build number in here by running Maven with "-Dplugin.version.description=$BUILD_TAG"
Default: ${plugin.version.description}
<sandboxStatus> String - Optional - sandbox status of this plugin.
<snapshotPluginVersionOverride> String 2.4 Optional - the version to use in place of the project version in the event that the project version is a -SNAPSHOT. If specified, the value must start with the project version after removing the terminal -SNAPSHOT, for example if the project version is 1.2.3-SNAPSHOT then the snapshotPluginVersionOverride could be 1.2.3-rc45.cafebabe-SNAPSHOT or 1.2.3-20180430.123233-56, etc, but it could not be 1.2.4 as that does not start with the project version. When testing plugin builds on a locally hosted update centre, in order to be allowed to update the plugin, the update centre must report the plugin version as greater than the currently installed plugin version. If you are using a Continuous Delivery model for your plugin (i.e. where the master branch stays on a version like 1.x-SNAPSHOT and releases are tagged but not merged back to master (in order to prevent merge conflicts) then you will find that you cannot update the plugin when building locally as 1.x-SNAPSHOT is never less than 1.x-SNAPSHOT. Thus in order to test plugin upgrade (in say an acceptance test), you need to override the plugin version for non-releases. Typically you would use something like git-timestamp-maven-plugin to populate a property with the version and then use this configuration to provide the version.
See also: failOnVersionOverrideToDifferentRelease
<warSourceDirectory> File - Single directory for extra files to include in the WAR.
Default: ${basedir}/src/main/webapp
<warSourceExcludes> String - The comma separated list of tokens to exclude from the WAR.
Alias: excludes
<warSourceIncludes> String - The comma separated list of tokens to include in the WAR.
Default: **
Alias: includes
<webappDirectory> File - The directory where the webapp is built.
Default: ${project.build.directory}/${project.build.finalName}
<webResources> Resource[] - The list of webResources we want to transfer.
<workDirectory> File - Directory to unpack dependent WARs into if needed
Default: ${project.build.directory}/war/work

Parameter Details

<archive>

The maven archive configuration to use.
  • Type: org.apache.maven.archiver.MavenArchiveConfiguration
  • Required: No

<classesDirectory>

The directory containing generated classes.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.outputDirectory}

<compatibleSinceVersion>

Optional - the oldest version of this plugin which the current version is configuration-compatible with.
See also: Mark a new plugin version as incompatible with older versions
  • Type: java.lang.String
  • Required: No
  • User Property: hpi.compatibleSinceVersion

<containerConfigXML>

The path to the context.xml file to use.
  • Type: java.io.File
  • Required: No
  • Default: ${maven.war.containerConfigXML}

<dependentWarExcludes>

The comma separated list of tokens to exclude when doing a way overlay.
  • Type: java.lang.String
  • Required: No

<dependentWarIncludes>

The comma separated list of tokens to include when doing a war overlay.
  • Type: java.lang.String
  • Required: No
  • Default: **

<failOnVersionOverrideToDifferentRelease>

Controls the safety check that prevents a snapshotPluginVersionOverride from switching to a different release version.
  • Type: boolean
  • Since: 2.4
  • Required: No
  • Default: true

<filters>

No description.
  • Type: java.util.List<java.lang.String>
  • Required: No
  • Default: ${project.build.filters}

<hpiName>

The name of the generated hpi.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.finalName}

<jarClassifier>

The classifier to use when searching for the jar artifact.
  • Type: java.lang.String
  • Since: 1.115
  • Required: No

<jenkinsCoreId>

Optional string that represents "groupId:artifactId" of Jenkins core jar. If left unspecified, the default groupId/artifactId pair for Jenkins is looked for.
  • Type: java.lang.String
  • Since: 1.65
  • Required: No

<jenkinsCoreVersionOverride>

Optional string that represents the version of Jenkins core to report plugins as requiring. This parameter is only used when unbundling functionality from Jenkins core and the version specified will be ignored if older than the autodetected version.
  • Type: java.lang.String
  • Required: No

<maskClasses>

[ws|tab|CR|LF]+ separated list of package prefixes that your plugin doesn't want to see from the core.

Tokens in this list is prefix-matched against the fully-qualified class name, so add "." to the end of each package name, like "com.foo. com.bar."

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

<minimumJavaVersion>

Deprecated.
removed without replacement

Specify the minimum version of Java that this plugin requires.
  • Type: java.lang.String
  • Required: No

<outputDirectory>

The directory for the generated WAR.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.build.directory}

<pluginFirstClassLoader>

Change the classloader preference such that classes locally bundled in this plugin will take precedence over those that are defined by the dependency plugins.

This is useful if the plugins that you want to depend on exposes conflicting versions of the libraries you are using, but enabling this switch makes your code susceptible to classloader constraint violations.

  • Type: boolean
  • Since: 1.53
  • Required: No

<pluginName>

Name of the plugin that Jenkins uses for display purpose. It should be one line text.
  • Type: java.lang.String
  • Required: No
  • Default: ${project.name}

<pluginVersionDescription>

Additional information that accompanies the version number of the plugin. Useful to distinguish snapshot builds. For example, if you are building snapshot plugins from Jenkins, you can put the build number in here by running Maven with "-Dplugin.version.description=$BUILD_TAG"
  • Type: java.lang.String
  • Required: No
  • Default: ${plugin.version.description}

<sandboxStatus>

Optional - sandbox status of this plugin.
  • Type: java.lang.String
  • Required: No

<snapshotPluginVersionOverride>

Optional - the version to use in place of the project version in the event that the project version is a -SNAPSHOT. If specified, the value must start with the project version after removing the terminal -SNAPSHOT, for example if the project version is 1.2.3-SNAPSHOT then the snapshotPluginVersionOverride could be 1.2.3-rc45.cafebabe-SNAPSHOT or 1.2.3-20180430.123233-56, etc, but it could not be 1.2.4 as that does not start with the project version. When testing plugin builds on a locally hosted update centre, in order to be allowed to update the plugin, the update centre must report the plugin version as greater than the currently installed plugin version. If you are using a Continuous Delivery model for your plugin (i.e. where the master branch stays on a version like 1.x-SNAPSHOT and releases are tagged but not merged back to master (in order to prevent merge conflicts) then you will find that you cannot update the plugin when building locally as 1.x-SNAPSHOT is never less than 1.x-SNAPSHOT. Thus in order to test plugin upgrade (in say an acceptance test), you need to override the plugin version for non-releases. Typically you would use something like git-timestamp-maven-plugin to populate a property with the version and then use this configuration to provide the version.
See also: failOnVersionOverrideToDifferentRelease
  • Type: java.lang.String
  • Since: 2.4
  • Required: No

<warSourceDirectory>

Single directory for extra files to include in the WAR.
  • Type: java.io.File
  • Required: No
  • Default: ${basedir}/src/main/webapp

<warSourceExcludes>

The comma separated list of tokens to exclude from the WAR.
  • Type: java.lang.String
  • Required: No
  • Alias: excludes

<warSourceIncludes>

The comma separated list of tokens to include in the WAR.
  • Type: java.lang.String
  • Required: No
  • Default: **
  • Alias: includes

<webappDirectory>

The directory where the webapp is built.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/${project.build.finalName}

<webResources>

The list of webResources we want to transfer.
  • Type: org.apache.maven.model.Resource[]
  • Required: No

<workDirectory>

Directory to unpack dependent WARs into if needed
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/war/work