diff --git a/pom.xml b/pom.xml
index 68519d85..fba6dc11 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,7 +65,7 @@
org.jenkins-ci.plugins
copyartifact
- 1.21
+ 1.35.1
org.jenkins-ci.main
diff --git a/src/main/java/hudson/plugins/s3/S3CopyArtifact.java b/src/main/java/hudson/plugins/s3/S3CopyArtifact.java
index 55fd8169..86eb9a33 100644
--- a/src/main/java/hudson/plugins/s3/S3CopyArtifact.java
+++ b/src/main/java/hudson/plugins/s3/S3CopyArtifact.java
@@ -59,6 +59,7 @@
import hudson.plugins.copyartifact.Messages;
import hudson.plugins.copyartifact.ParametersBuildFilter;
import hudson.plugins.copyartifact.WorkspaceSelector;
+import hudson.plugins.copyartifact.StatusBuildSelector;
import hudson.security.AccessControlled;
import hudson.security.SecurityRealm;
import hudson.tasks.BuildStepDescriptor;
@@ -101,16 +102,21 @@ public class S3CopyArtifact extends Builder {
private final String filter, target;
private /*almost final*/ BuildSelector selector;
private final Boolean flatten, optional;
+
+ private static final BuildSelector DEFAULT_BUILD_SELECTOR = new StatusBuildSelector(true);
@DataBoundConstructor
- public S3CopyArtifact(String projectName, BuildSelector selector, String filter, String target,
+ public S3CopyArtifact(String projectName, BuildSelector buildSelector, String filter, String target,
boolean flatten, boolean optional) {
// Prevents both invalid values and access to artifacts of projects which this user cannot see.
// If value is parameterized, it will be checked when build runs.
if (projectName.indexOf('$') < 0 && new JobResolver(projectName).job == null)
projectName = ""; // Ignore/clear bad value to avoid ugly 500 page
this.projectName = projectName;
- this.selector = selector;
+ if (buildSelector == null) {
+ buildSelector = DEFAULT_BUILD_SELECTOR;
+ }
+ this.selector = buildSelector;
this.filter = Util.fixNull(filter).trim();
this.target = Util.fixNull(target).trim();
this.flatten = flatten ? Boolean.TRUE : null;
diff --git a/src/main/resources/hudson/plugins/s3/S3CopyArtifact.stapler b/src/main/resources/hudson/plugins/s3/S3CopyArtifact.stapler
deleted file mode 100644
index c8231330..00000000
--- a/src/main/resources/hudson/plugins/s3/S3CopyArtifact.stapler
+++ /dev/null
@@ -1,2 +0,0 @@
-#Thu Jan 12 13:32:19 PST 2012
-constructor=projectName,selector,filter,target,flatten,optional
diff --git a/src/main/resources/hudson/plugins/s3/S3CopyArtifact/config.jelly b/src/main/resources/hudson/plugins/s3/S3CopyArtifact/config.jelly
index c84ae284..1d0b766b 100644
--- a/src/main/resources/hudson/plugins/s3/S3CopyArtifact/config.jelly
+++ b/src/main/resources/hudson/plugins/s3/S3CopyArtifact/config.jelly
@@ -1,10 +1,10 @@
-
+
-
+
diff --git a/src/main/resources/hudson/plugins/s3/selectorList.jelly b/src/main/resources/hudson/plugins/s3/selectorList.jelly
deleted file mode 100644
index f3019b97..00000000
--- a/src/main/resources/hudson/plugins/s3/selectorList.jelly
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
- Generates a dropdown list with the available BuildSelectors.
-
- BuildSelector that is currently configured; form is populated showing this object.
-
-
- Name for the form element.
-
-
- Title for the form section.
-
-
- Optional description for form section.
-
-
- Provide the descriptor that has getBuildSelectors(), if not already in ${descriptor}.
-
-
- Optional name of a selector type to omit from the list.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-