diff --git a/core/src/main/java/hudson/model/FileParameterValue.java b/core/src/main/java/hudson/model/FileParameterValue.java
index 4abddab70bc0f59068013ffd13fd374d84436d09..e5bfda9881329b83290debe7ecea5aecdef44a30 100644
--- a/core/src/main/java/hudson/model/FileParameterValue.java
+++ b/core/src/main/java/hudson/model/FileParameterValue.java
@@ -66,6 +66,9 @@ public class FileParameterValue extends ParameterValue {
*/
private final String originalFileName;
+ /**
+ * Overrides the location in the build to place this file. Initially set to {@link #getName()}
+ */
private String location;
@DataBoundConstructor
@@ -81,6 +84,7 @@ public class FileParameterValue extends ParameterValue {
super(name);
this.file = file;
this.originalFileName = originalFileName;
+ setLocation(name);
}
// post initialization hook
@@ -129,7 +133,7 @@ public class FileParameterValue extends ParameterValue {
return new BuildWrapper() {
@Override
public Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException {
- if (!StringUtils.isEmpty(file.getName())) {
+ if (!StringUtils.isEmpty(location)) {
listener.getLogger().println("Copying file to "+location);
FilePath locationFilePath = build.getWorkspace().child(location);
locationFilePath.getParent().mkdirs();
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 2850cbf7ff63ae32dab54b72e48f56da46c18e5b..54c16e363f64a814f94c1a87443c672a39fd17be 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -4,7 +4,7 @@
org.jenkins-ci
jenkins
- 1.30
+ 1.31
@@ -101,13 +101,6 @@
not to have version number in the .hpi file name.
-->
${project.artifactId}
-
org.jenkins-ci.tools