-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: plugin-compat-tester
-
None
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
- 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.
- Then addSplitPluginDependencies sees token-macro as a dependency of maven-plugin, and so adds that too, even though it is optional (and not bundled).
- BREAK_CYCLES only covers a dependency from script-security, not token-macro.
- links to