* A generalization of {@link BuildWrapper} that, like {@link SimpleBuildStep}, may be called at various points within a build.
* <p>Such a build wrapper would typically be written according to make few assumptions about how it is being used.
* Some hints about this refactoring:
* <ul>
* <li>Replace {@link AbstractBuild#getWorkspace} with the provided path.
* <li>Replace {@link AbstractBuild#getProject} with {@link Run#getParent}.
* <li>Use {@link FilePath#toComputer} rather than {@link Computer#currentComputer}.
* <li>Do not bother with {@link AbstractBuild#getBuildVariables} if you are not passed an {@link AbstractBuild} (treat it like an empty map).
* <li>The {@link Disposer} must be safely serializable. This means it should be a {@code static} class if nested, and define a {@code serialVersionUID}.
* </ul>
* @since TODO
*/
@SuppressWarnings("rawtypes")// inherited
...
...
@@ -77,8 +86,9 @@ public abstract class SimpleBuildWrapper extends BuildWrapper {
returnenv;
}
/**
* Specify an environment variable override (as in {@link EnvVars#override}) to apply to processes launched within the block.
* Specify an environment variable override to apply to processes launched within the block.
* If unspecified, environment variables will be inherited unmodified.
* @param key handles the special {@code PATH+SOMETHING} syntax as in {@link EnvVars#override}