Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-74848] Issue in config.xml CannotResolveClassException: com.cloudbees.jenkins.plugins.bitbucket.MergeWithGitSCMExtension #911

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@
import hudson.RestrictedSince;
import hudson.Util;
import hudson.console.HyperlinkNote;
import hudson.init.InitMilestone;
import hudson.init.Initializer;
import hudson.model.Action;
import hudson.model.Actionable;
import hudson.model.Item;
import hudson.model.Items;
import hudson.model.TaskListener;
import hudson.plugins.git.GitSCM;
import hudson.scm.SCM;
Expand All @@ -87,6 +90,7 @@
import java.util.logging.Logger;
import jenkins.authentication.tokens.api.AuthenticationTokens;
import jenkins.model.Jenkins;
import jenkins.plugins.git.MergeWithGitSCMExtension;
import jenkins.plugins.git.traits.GitBrowserSCMSourceTrait;
import jenkins.scm.api.SCMHead;
import jenkins.scm.api.SCMHeadCategory;
Expand Down Expand Up @@ -140,6 +144,14 @@ public class BitbucketSCMSource extends SCMSource {
private static final String CLOUD_REPO_TEMPLATE = "{/owner,repo}";
private static final String SERVER_REPO_TEMPLATE = "/projects{/owner}/repos{/repo}";

/**
* Mapping classes after refactoring for backward compatibility.
*/
@Initializer(before = InitMilestone.PLUGINS_STARTED)
public static void aliases() {
Items.XSTREAM2.addCompatibilityAlias("com.cloudbees.jenkins.plugins.bitbucket.MergeWithGitSCMExtension", MergeWithGitSCMExtension.class);
}

/** How long to delay events received from Bitbucket in order to allow the API caches to sync. */
private static /*mostly final*/ int eventDelaySeconds =
Math.min(
Expand Down