hpi:jar
Full name:
org.jenkins-ci.tools:maven-hpi-plugin:3.61-SNAPSHOT:jar
Description:
Build a jar separate from the hpi goal. If you do not use this goal then the HpiMojo
will generate a jar file anyway. Using this goal it is possible to customize the jar file that is built, e.g. shading dependencies, code signing, etc
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:
1.115
. - Binds by default to the lifecycle phase:
prepare-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 |
- |
The classifier to use 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} |
<outputTimestamp> |
String |
TODO |
Timestamp for reproducible output archive entries, either formatted as ISO 8601 yyyy-MM-dd'T'HH:mm:ssXXX or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).Default: ${project.build.outputTimestamp} |
<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 |
<webResources> |
Resource[] |
- |
The list of webResources we want to transfer. |
<webappDirectory> |
File |
- |
The directory where the webapp is built. Default: ${project.build.directory}/${project.build.finalName} |
<workDirectory> |
File |
- |
Directory to unpack dependent WARs into if needed Default: ${project.build.directory}/war/work |
Parameter Details
<archive>
- Type:
org.apache.maven.archiver.MavenArchiveConfiguration
- Required:
No
<classesDirectory>
- Type:
java.io.File
- Required:
No
- Default:
${project.build.outputDirectory}
<compatibleSinceVersion>
See also: Mark a new plugin version as incompatible with older versions
- Type:
java.lang.String
- Required:
No
- User Property:
hpi.compatibleSinceVersion
<containerConfigXML>
- Type:
java.io.File
- Required:
No
- Default:
${maven.war.containerConfigXML}
<dependentWarExcludes>
- Type:
java.lang.String
- Required:
No
<dependentWarIncludes>
- Type:
java.lang.String
- Required:
No
- Default:
**
<failOnVersionOverrideToDifferentRelease>
snapshotPluginVersionOverride
from switching to a different release version.- Type:
boolean
- Since:
2.4
- Required:
No
- Default:
true
<filters>
- Type:
java.util.List<java.lang.String>
- Required:
No
- Default:
${project.build.filters}
<hpiName>
- Type:
java.lang.String
- Required:
No
- Default:
${project.build.finalName}
<jarClassifier>
- Type:
java.lang.String
- Required:
No
<jenkinsCoreId>
- Type:
java.lang.String
- Since:
1.65
- Required:
No
<jenkinsCoreVersionOverride>
- Type:
java.lang.String
- Required:
No
<maskClasses>
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>
removed without replacement
- Type:
java.lang.String
- Required:
No
<outputDirectory>
- Type:
java.lang.String
- Required:
No
- Default:
${project.build.directory}
<outputTimestamp>
yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).- Type:
java.lang.String
- Since:
TODO
- Required:
No
- Default:
${project.build.outputTimestamp}
<pluginFirstClassLoader>
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>
- Type:
java.lang.String
- Required:
No
- Default:
${project.name}
<pluginVersionDescription>
- Type:
java.lang.String
- Required:
No
- Default:
${plugin.version.description}
<sandboxStatus>
- Type:
java.lang.String
- Required:
No
<snapshotPluginVersionOverride>
-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>
- Type:
java.io.File
- Required:
No
- Default:
${basedir}/src/main/webapp
<warSourceExcludes>
- Type:
java.lang.String
- Required:
No
- Alias:
excludes
<warSourceIncludes>
- Type:
java.lang.String
- Required:
No
- Default:
**
- Alias:
includes
<webResources>
- Type:
org.apache.maven.model.Resource[]
- Required:
No
<webappDirectory>
- Type:
java.io.File
- Required:
No
- Default:
${project.build.directory}/${project.build.finalName}
<workDirectory>
- Type:
java.io.File
- Required:
No
- Default:
${project.build.directory}/war/work