Errors analyzing windows-slaves against 1.609.1

XMLWordPrintable

      mvn "-Dexec.args=-classpath %classpath org.jenkins.tools.test.PluginCompatTesterCli -includePlugins windows-slaves -war .../jenkins.war -workDirectory /tmp/plugin-compat-tester -reportFile /tmp/plugin-compat-tester.xml -skipTestCache true -mvn .../maven/bin/mvn" -Dexec.executable=.../jdk/bin/java org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
      

      passes but prints errors

      ... hudson.PluginManager$1$3$2$1 reactOnCycle
      SEVERE: found cycle in plugin dependencies: (root=Plugin:windows-slaves, deactivating all involved) Plugin:windows-slaves -> Plugin:token-macro -> Plugin:matrix-auth -> Plugin:windows-slaves
      

      Reproducible by adding a dependency on token-macro to the windows-slaves POM, and updating baseline to 1.609.1. Appears as an actual test failure if you add

      package hudson.os.windows;
      
      import static org.junit.Assert.assertTrue;
      import org.junit.Test;
      import org.junit.Rule;
      import org.jvnet.hudson.test.JenkinsRule;
      
      public class SomeTest {
      
          @Rule public JenkinsRule r = new JenkinsRule();
      
          @Test public void active() {
              assertTrue(r.jenkins.getPluginManager().getPlugin("windows-slaves").isActive());
          }
      
      }
      

      I think the problem is that

      1. PluginCompatTester.addSplitPluginDependencies mistakenly sees maven-plugin as a dependency, because dependency:resolve was mistakenly seeing it as a plugin dependency, and so asks to add that as a dependency—though MavenPom.addDependencies ignores the request, for reasons I now forget.
      2. Then addSplitPluginDependencies sees token-macro as a dependency of maven-plugin, and so adds that too, even though it is optional (and not bundled).
      3. BREAK_CYCLES only covers a dependency from script-security, not token-macro.

            Assignee:
            Jesse Glick
            Reporter:
            Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: