Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-1431

maven2 builds fail if they use an old version of surefire

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • maven-plugin
    • None
    • Platform: All, OS: All

      One of our projects uses surefire plugin 2.3 :- this fails with the following error:

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to configure plugin parameters for:
      org.apache.maven.plugins:maven-surefire-plugin:2.3

      Cause: Cannot find setter nor field in
      org.apache.maven.plugin.surefire.SurefirePlugin for 'skipTests'
      [INFO] ------------------------------------------------------------------------
      [DEBUG] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring:
      org.apache.maven.plugins:maven-surefire-plugin. Reason: Unable to parse the
      created DOM for plugin configuration
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:568)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
      at
      org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:42)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at hudson.maven.agent.Main.launch(Main.java:97)
      at hudson.maven.MavenBuilder.call(MavenBuilder.java:129)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:476)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:422)
      at hudson.remoting.UserRequest.perform(UserRequest.java:69)
      at hudson.remoting.UserRequest.perform(UserRequest.java:23)
      at hudson.remoting.Request$2.run(Request.java:200)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      at
      java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      at java.lang.Thread.run(Thread.java:613)
      Caused by: org.apache.maven.plugin.PluginConfigurationException: Error
      configuring: org.apache.maven.plugins:maven-surefire-plugin. Reason: Unable to
      parse the created DOM for plugin configuration
      at
      org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1157)
      at
      org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:618)
      at
      org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:425)
      at
      hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:136)
      at
      org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
      ... 28 more
      Caused by:
      org.codehaus.plexus.component.configurator.ComponentConfigurationException:
      Cannot find setter nor field in org.apache.maven.plugin.surefire.SurefirePlugin
      for 'skipTests'
      at
      org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.<init>(ComponentValueSetter.java:68)
      at
      org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:134)
      at
      org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
      at
      hudson.maven.agent.ComponentConfiguratorFilter.configureComponent(ComponentConfiguratorFilter.java:26)
      at
      hudson.maven.agent.PluginManagerInterceptor$2.configureComponent(PluginManagerInterceptor.java:122)
      at
      org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1151)
      ... 32 more

      Upgrading it temporarily to 2.4 makes it work. Should degrade gracefully if an
      older plugin is being used rather than crashing the build.

            Unassigned Unassigned
            magnayn magnayn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: