Skip to content
Permalink
Browse files

Fix JENKINS-49770

Move to previous DataBoundConstructor because of publish-over constraints
  • Loading branch information
slide committed Mar 1, 2018
1 parent a8182c0 commit 81e80e924bf447dd785af75d2127b7ff207629e8
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/main/java/jenkins/plugins/publish_over_ssh/BapSshTransfer.java
@@ -52,7 +52,7 @@
this(sourceFiles, null, remoteDirectory, removePrefix, remoteDirectorySDF, flatten, execCommand, execTimeout, false, false, false, null);
}

@Deprecated
@DataBoundConstructor
public BapSshTransfer(final String sourceFiles, final String excludes, final String remoteDirectory, final String removePrefix,
final boolean remoteDirectorySDF, final boolean flatten, final String execCommand, final int execTimeout,
final boolean usePty, final boolean noDefaultExcludes, final boolean makeEmptyDirs, final String patternSeparator) {
@@ -63,11 +63,6 @@ public BapSshTransfer(final String sourceFiles, final String excludes, final Str
this.useAgentForwarding = false;
}

@DataBoundConstructor
public BapSshTransfer(final String sourceFiles) {
super(sourceFiles, null, null, null, false, false);
}

public String getExecCommand() { return execCommand; }

@DataBoundSetter

7 comments on commit 81e80e9

@sli921

This comment has been minimized.

Copy link

@sli921 sli921 replied Jul 27, 2018

I've installed this fix but get the error "There's no @DataBoundConstructor on any constructor of class java.util.ArrayList..."

see my comment on https://wiki.jenkins.io/display/JENKINS/Publish+Over+SSH+Plugin for further information

@slide

This comment has been minimized.

Copy link
Member Author

@slide slide replied Jul 27, 2018

You have to provide all of the arguments. User the snippet generator to show you

@sli921

This comment has been minimized.

Copy link

@sli921 sli921 replied Jul 27, 2018

Where can I find the code for Declarative Syntax? Or is only the Pipeline Syntax supported?

@slide

This comment has been minimized.

Copy link
Member Author

@slide slide replied Jul 27, 2018

I believe it's the same, but I have never used declarative, so I don't know.

@sli921

This comment has been minimized.

Copy link

@sli921 sli921 replied Jul 27, 2018

There is no declarative syntax so I put it into script {} and it's working now. Thank you very much for your support!

@slide

This comment has been minimized.

Copy link
Member Author

@slide slide replied Jul 27, 2018

For steps, the same syntax should work as far as I know. I don't know of any special requirements for plugins to add support for declarative syntax, so it should work for both declarative and scripted.

@sli921

This comment has been minimized.

Copy link

@sli921 sli921 replied Jul 27, 2018

Thanks for clarifying. I've made a mistake.

Please sign in to comment.