Package org.jvnet.hudson.test
Class RealJenkinsRule.SyntheticPlugin
java.lang.Object
org.jvnet.hudson.test.RealJenkinsRule.SyntheticPlugin
- Enclosing class:
- RealJenkinsRule
Alternative to
RealJenkinsRule.addPlugins(java.lang.String...) or TestExtension that lets you build a test-only plugin on the fly.
(ExtensionList.add(Object) can also be used for certain cases, but not if you need to define new types.)-
Constructor Summary
ConstructorsConstructorDescriptionSyntheticPlugin(Class<?> exampleClass) Creates a new synthetic plugin builder.SyntheticPlugin(Package pkg) Creates a new synthetic plugin builder.SyntheticPlugin(String pkg) Creates a new synthetic plugin builder. -
Method Summary
Modifier and TypeMethodDescriptionAdd an extra plugin manifest header.Plugin identifier (Short-Namemanifest header).Plugin version string (Plugin-Versionmanifest header).
-
Constructor Details
-
SyntheticPlugin
Creates a new synthetic plugin builder.- Parameters:
exampleClass- an example of a class from the Java package containing any classes and resources you want included- See Also:
-
SyntheticPlugin
Creates a new synthetic plugin builder.- Parameters:
pkg- the Java package containing any classes and resources you want included- See Also:
-
SyntheticPlugin
Creates a new synthetic plugin builder.- Parameters:
pkg- the name of a Java package containing any classes and resources you want included- See Also:
-
-
Method Details
-
shortName
Plugin identifier (Short-Namemanifest header). Defaults to being calculated from the package name, replacing.with-and prefixed bysynthetic-. -
version
Plugin version string (Plugin-Versionmanifest header). Defaults to an arbitrary snapshot version. -
header
Add an extra plugin manifest header. Examples:Jenkins-Version: 2.387.3Plugin-Dependencies: structs:325.vcb_307d2a_2782,support-core:1356.vd0f980edfa_46;resolution:=optionalLong-Name: My Plugin
-