Skip to content

Commit

Permalink
Fix JENKINS-49770
Browse files Browse the repository at this point in the history
Move to previous DataBoundConstructor because of publish-over constraints
  • Loading branch information
slide committed Mar 1, 2018
1 parent a8182c0 commit 81e80e9
Showing 1 changed file with 1 addition and 6 deletions.
Expand Up @@ -52,7 +52,7 @@ public class BapSshTransfer extends BPTransfer implements Describable<BapSshTran
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) {
Expand All @@ -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
Expand Down

7 comments on commit 81e80e9

@sli921
Copy link

@sli921 sli921 commented on 81e80e9 Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member Author

@slide slide commented on 81e80e9 Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sli921
Copy link

@sli921 sli921 commented on 81e80e9 Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@slide
Copy link
Member Author

@slide slide commented on 81e80e9 Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sli921
Copy link

@sli921 sli921 commented on 81e80e9 Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@slide
Copy link
Member Author

@slide slide commented on 81e80e9 Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

@sli921 sli921 commented on 81e80e9 Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying. I've made a mistake.

Please sign in to comment.