Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-38935] Should add aliases on base plugin methods as 'start'
  • Loading branch information
lanwen committed Oct 12, 2016
1 parent e967f0a commit b916940
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/org/jenkinsci/plugins/github/GitHubPlugin.java
Expand Up @@ -23,8 +23,6 @@ public class GitHubPlugin extends Plugin {
/**
* Launched before plugin starts
* Adds alias for {@link GitHubPlugin} to simplify resulting xml.
* Expected milestone: @Initializer(before = PLUGINS_STARTED)
* * @see #initializers()
*/
public static void addXStreamAliases() {
Migrator.enableCompatibilityAliases();
Expand All @@ -35,19 +33,23 @@ public static void addXStreamAliases() {
* Launches migration after plugin already initialized.
* Expected milestone: @Initializer(after = PLUGINS_PREPARED)
*
* @see #initializers()
* @see #migrator()
*/
public static void runMigrator() throws Exception {
new Migrator().migrate();
}

@Override
public void start() throws Exception {
addXStreamAliases();
}

/**
* We need ensure that migrator will run after xstream aliases will be added.
* Unclear how reactor will sort single methods, so bundle in one step.
*/
@Initializer(after = PLUGINS_PREPARED, before = PLUGINS_STARTED)
public static void initializers() throws Exception {
addXStreamAliases();
public static void migrator() throws Exception {
runMigrator();
}

Expand Down

0 comments on commit b916940

Please sign in to comment.