Skip to content

Commit 736599a

Browse files
authored
Make credentials-binding dep optional (#3971)
1 parent 93c9316 commit 736599a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
<dependency>
133133
<groupId>org.jenkins-ci.plugins</groupId>
134134
<artifactId>credentials-binding</artifactId>
135+
<optional>true</optional>
135136
</dependency>
136137
<dependency>
137138
<groupId>org.jenkins-ci.plugins</groupId>

src/main/java/jenkins/plugins/git/GitUsernamePasswordBinding.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import hudson.Launcher;
1010
import hudson.model.Run;
1111
import hudson.model.TaskListener;
12-
import hudson.Extension;
1312
import hudson.plugins.git.GitSCM;
1413
import hudson.plugins.git.GitTool;
1514
import hudson.util.ListBoxModel;
@@ -23,6 +22,7 @@
2322
import org.jenkinsci.plugins.gitclient.CliGitAPIImpl;
2423
import org.jenkinsci.plugins.gitclient.Git;
2524
import org.jenkinsci.plugins.gitclient.GitClient;
25+
import org.jenkinsci.plugins.variant.OptionalExtension;
2626
import org.kohsuke.stapler.DataBoundConstructor;
2727

2828
import java.io.IOException;
@@ -200,7 +200,7 @@ private String windowsArgEncodeFileName(String filename) {
200200

201201
// Mistakenly defined GitUsernamePassword in first release, prefer gitUsernamePassword as symbol
202202
@Symbol({"gitUsernamePassword", "GitUsernamePassword"})
203-
@Extension
203+
@OptionalExtension(requirePlugins = "credentials-binding")
204204
public static final class DescriptorImpl extends BindingDescriptor<StandardUsernamePasswordCredentials> {
205205

206206
@NonNull

0 commit comments

Comments
 (0)