hpi:resolve-test-dependencies
Full name:
org.jenkins-ci.tools:maven-hpi-plugin:3.59-SNAPSHOT:resolve-test-dependencies
Description:
Places test-dependency plugins into somewhere the test harness can pick up.
See TestPluginManager.loadBundledPlugins()
where the test harness uses it.
Additionally, it may adjust the classpath for surefire:test
to run tests against different versions of various dependencies than what was configured in the POM.
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope:
test
. - The goal is not marked as thread-safe and thus does not support parallel builds.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<classesDirectory> |
File |
- |
The directory containing generated classes. Default: ${project.build.outputDirectory} |
<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} |
<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." |
<outputDirectory> |
String |
- |
The directory for the generated WAR. Default: ${project.build.directory} |
<overrideVersions> |
List<String> |
- |
List of dependency version overrides in the form groupId:artifactId:version to apply during testing. Must correspond to dependencies already present in the project model or their transitive dependencies.User Property: overrideVersions |
<overrideWar> |
File |
- |
Path to a Jenkins WAR file with bundled plugins to apply during testing.
Dependencies already present in the project model or their transitive dependencies will be updated to the versions in the WAR. May be combined with The version of the WAR must be identical to User Property: overrideWar |
<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} |
<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 |
<upperBoundsExcludes> |
List<String> |
- |
List of exclusions to upper bound updates in the form groupId:artifactId . Must not be provided when useUpperBounds is false.User Property: upperBoundsExcludes |
<useUpperBounds> |
boolean |
- |
Whether to update all transitive dependencies to the upper bounds. Effectively causes the same behavior as the requireUpperBoundDeps Enforcer rule would, if the specified dependencies were to be written to the POM. Intended for use in conjunction with overrideVersions or overrideWar .User Property: useUpperBounds |
<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
<classesDirectory>
- Type:
java.io.File
- Required:
No
- Default:
${project.build.outputDirectory}
<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}
<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
<outputDirectory>
- Type:
java.lang.String
- Required:
No
- Default:
${project.build.directory}
<overrideVersions>
groupId:artifactId:version
to apply during testing. Must correspond to dependencies already present in the project model or their transitive dependencies.- Type:
java.util.List<java.lang.String>
- Required:
No
- User Property:
overrideVersions
<overrideWar>
Dependencies already present in the project model or their transitive dependencies will be updated to the versions in the WAR.
May be combined with overrideVersions
so long as the results do not conflict.
The version of the WAR must be identical to jenkins.version
.
- Type:
java.io.File
- Required:
No
- User Property:
overrideWar
<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}
<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
<upperBoundsExcludes>
groupId:artifactId
. Must not be provided when useUpperBounds
is false.- Type:
java.util.List<java.lang.String>
- Required:
No
- User Property:
upperBoundsExcludes
<useUpperBounds>
requireUpperBoundDeps
Enforcer rule would, if the specified dependencies were to be written to the POM. Intended for use in conjunction with overrideVersions
or overrideWar
.- Type:
boolean
- Required:
No
- User Property:
useUpperBounds
<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