Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.2
    • Labels:
      None
    • Environment:
      maven 2.0
    • Number of attachments :
      1

      Description

      surefire-report reruns the tests. In my case this is not just annoying, but leads to a failure, as the VM (probably) is reused and leftovers from the first tests are (definitly) still present.

      I run maven with: clean package site

        Issue Links

          Activity

          Hide
          Dirk Sturzebecher added a comment -

          one more detail, if I include the plugin in the build section (as in the documentation) it is not triggered. I have included it in the reporting section (which kind of makes sense)...

          Show
          Dirk Sturzebecher added a comment - one more detail, if I include the plugin in the build section (as in the documentation) it is not triggered. I have included it in the reporting section (which kind of makes sense)...
          Hide
          Johnny R. Ruiz III added a comment -

          Maybe it is better if we don't re-run the test on report generation. What do you guys think?

          Show
          Johnny R. Ruiz III added a comment - Maybe it is better if we don't re-run the test on report generation. What do you guys think?
          Hide
          Brett Porter added a comment -

          if we omit the test running, then just running "mvn site" will fail.

          I'm not sure what failures are encountered other than being annoying

          Anyway, this is a core Maven issue, and we are looking to improve it in Maven 2.1/2.2

          Show
          Brett Porter added a comment - if we omit the test running, then just running "mvn site" will fail. I'm not sure what failures are encountered other than being annoying Anyway, this is a core Maven issue, and we are looking to improve it in Maven 2.1/2.2
          Hide
          Dirk Sturzebecher added a comment -

          do not run the tests unnecessarily again, this can only cause trouble!

          the best would be if the tests would be considered as a dependencies, so not run if there is something in the surefire dir, run if it is empty (or something of this kind)

          Show
          Dirk Sturzebecher added a comment - do not run the tests unnecessarily again, this can only cause trouble! the best would be if the tests would be considered as a dependencies, so not run if there is something in the surefire dir, run if it is empty (or something of this kind)
          Hide
          Carlos Sanchez added a comment -

          I'd add a property to the report plugin like "always run tests". If false it'd check for reports and not run tests if present

          Show
          Carlos Sanchez added a comment - I'd add a property to the report plugin like "always run tests". If false it'd check for reports and not run tests if present
          Hide
          Grégory Joseph added a comment -

          For some reason, when executing the test phase, the settings of the surefire plugin seem to not be taken into account: my tests are not forked, thus failing.

          Show
          Grégory Joseph added a comment - For some reason, when executing the test phase, the settings of the surefire plugin seem to not be taken into account: my tests are not forked, thus failing.
          Hide
          Grégory Joseph added a comment -

          Hmm, nevermind that - my tests are failing because they're run twice - if I remove the clover report plugin, which also runs the tests, then they don't fail ..

          Show
          Grégory Joseph added a comment - Hmm, nevermind that - my tests are failing because they're run twice - if I remove the clover report plugin, which also runs the tests, then they don't fail ..
          Hide
          Dirk Sturzebecher added a comment -

          Just tried the same again with maven 2.0.2 and set my surefire to fork. Works fine now. That is the result looks good on first inspection, but the console shows errors as below. First one looks like a missing file, second one seams a problem with the local. My environment is a german local. Seams to be te typical difference between english numbers (2,000.) and german numbers (2.000,)

          [exec] [INFO] [surefire:test]
          [exec] [INFO] Setting reports dir: C:\Dokumente und Einstellungen\dsturze\Eigene Dateien\dirk\projects\MoneyPlus-0.4.4\target/surefire-reports
          [exec] [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
          [exec] [INFO] Setting property: velocimacro.messages.on => 'false'.
          [exec] [INFO] Setting property: resource.loader => 'classpath'.
          [exec] [INFO] Setting property: resource.manager.logwhenfound => 'false'.
          [exec] [INFO] **************************************************************
          [exec] [INFO] Starting Jakarta Velocity v1.4
          [exec] [INFO] RuntimeInstance initializing.
          [exec] [INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
          [exec] [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
          [exec] [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
          [exec] [INFO] ClasspathResourceLoader : initialization starting.
          [exec] [INFO] ClasspathResourceLoader : initialization complete.
          [exec] [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
          [exec] [INFO] Default ResourceManager initialization complete.
          [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
          [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
          [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
          [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
          [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
          [exec] [INFO] Created: 20 parsers.
          [exec] [INFO] Velocimacro : initialization starting.
          [exec] [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
          [exec] [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
          [exec] [INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
          [exec] [INFO] Velocimacro : VM library template macro registration complete.
          [exec] [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
          [exec] [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
          [exec] [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed.
          [exec] [INFO] Velocimacro : initialization complete.
          [exec] [INFO] Velocity successfully started.
          [exec] [INFO] [site:site]
          [exec] [WARNING] Error loading report org.codehaus.mojo.surefire.SurefireReportMojo - AbstractMethodError: canGenerateReport()
          [exec] [INFO] Generate "Maven Surefire Report" report.
          [exec] java.lang.NumberFormatException: For input string: "0,282"
          [exec] at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
          [exec] at java.lang.Float.parseFloat(Float.java:394)
          [exec] at org.codehaus.mojo.surefire.ReportTestSuite.startElement(ReportTestSuite.java:78)
          [exec] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
          [exec] at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:798)
          [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:878)
          [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:1157)
          [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794)
          [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
          [exec] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
          [exec] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
          [exec] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
          [exec] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
          [exec] at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
          [exec] at javax.xml.parsers.SAXParser.parse(SAXParser.java:311)
          [exec] at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:59)
          [exec] at org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:42)
          [exec] at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44)
          [exec] at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77)
          [exec] at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
          [exec] at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
          [exec] at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
          [exec] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
          [exec] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
          [exec] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
          [exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
          [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          [exec] at java.lang.reflect.Method.invoke(Method.java:585)
          [exec] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
          [exec] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
          [exec] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
          [exec] at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
          [exec] java.lang.NumberFormatException: For input string: "0,313"
          [exec] at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
          [exec] at java.lang.Float.parseFloat(Float.java:394)
          [exec] at org.codehaus.mojo.surefire.ReportTestSuite.startElement(ReportTestSuite.java:78)
          [exec] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
          [exec] at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:798)
          [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:878)
          [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:1157)
          [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794)
          [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
          [exec] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
          [exec] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
          [exec] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
          [exec] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
          [exec] at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
          [exec] at javax.xml.parsers.SAXParser.parse(SAXParser.java:311)
          [exec] at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:59)
          [exec] at org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:42)
          [exec] at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44)
          [exec] at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77)
          [exec] at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
          [exec] at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
          [exec] at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
          [exec] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
          [exec] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
          [exec] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
          [exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
          [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          [exec] at java.lang.reflect.Method.invoke(Method.java:585)
          [exec] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
          [exec] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
          [exec] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
          [exec] at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
          [exec] java.lang.NullPointerException
          [exec] at org.codehaus.mojo.surefire.SurefireReportGenerator.constructTestCasesSection(SurefireReportGenerator.java:344)
          [exec] at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:60)
          [exec] at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77)
          [exec] at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117)
          [exec] at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
          [exec] at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
          [exec] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
          [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
          [exec] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
          [exec] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
          [exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
          [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          [exec] at java.lang.reflect.Method.invoke(Method.java:585)
          [exec] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
          [exec] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
          [exec] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
          [exec] at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
          [exec] [ERROR] VM #displayTree: error : too few arguments to macro. Wanted 2 got 0
          [exec] [ERROR] VM #menuItem: error : too few arguments to macro. Wanted 1 got 0
          [exec] [INFO] Generate "Continuous Integration" report.
          [exec] [INFO] Generate "Dependencies" report.
          [exec] [INFO] Generate "Issue Tracking" report.
          [exec] [INFO] Generate "Project License" report.
          [exec] [INFO] Generate "Mailing Lists" report.
          [exec] [INFO] Generate "Source Repository" report.
          [exec] [INFO] Generate "Project Team" report.
          [exec] [INFO] Generate an index file for the English version.
          [exec] [INFO] ----------------------------------------------------------------------------
          [exec] [INFO] BUILD SUCCESSFUL
          [exec] [INFO] ----------------------------------------------------------------------------

          Show
          Dirk Sturzebecher added a comment - Just tried the same again with maven 2.0.2 and set my surefire to fork. Works fine now. That is the result looks good on first inspection, but the console shows errors as below. First one looks like a missing file, second one seams a problem with the local. My environment is a german local. Seams to be te typical difference between english numbers (2,000. ) and german numbers (2.000, ) [exec] [INFO] [surefire:test] [exec] [INFO] Setting reports dir: C:\Dokumente und Einstellungen\dsturze\Eigene Dateien\dirk\projects\MoneyPlus-0.4.4\target/surefire-reports [exec] [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [exec] [INFO] Setting property: velocimacro.messages.on => 'false'. [exec] [INFO] Setting property: resource.loader => 'classpath'. [exec] [INFO] Setting property: resource.manager.logwhenfound => 'false'. [exec] [INFO] ************************************************************** [exec] [INFO] Starting Jakarta Velocity v1.4 [exec] [INFO] RuntimeInstance initializing. [exec] [INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties [exec] [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl) [exec] [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader [exec] [INFO] ClasspathResourceLoader : initialization starting. [exec] [INFO] ClasspathResourceLoader : initialization complete. [exec] [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl) [exec] [INFO] Default ResourceManager initialization complete. [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include [exec] [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach [exec] [INFO] Created: 20 parsers. [exec] [INFO] Velocimacro : initialization starting. [exec] [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm [exec] [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader. [exec] [INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm' [exec] [INFO] Velocimacro : VM library template macro registration complete. [exec] [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates [exec] [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions [exec] [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed. [exec] [INFO] Velocimacro : initialization complete. [exec] [INFO] Velocity successfully started. [exec] [INFO] [site:site] [exec] [WARNING] Error loading report org.codehaus.mojo.surefire.SurefireReportMojo - AbstractMethodError: canGenerateReport() [exec] [INFO] Generate "Maven Surefire Report" report. [exec] java.lang.NumberFormatException: For input string: "0,282" [exec] at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224) [exec] at java.lang.Float.parseFloat(Float.java:394) [exec] at org.codehaus.mojo.surefire.ReportTestSuite.startElement(ReportTestSuite.java:78) [exec] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533) [exec] at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:798) [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:878) [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:1157) [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794) [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) [exec] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) [exec] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) [exec] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) [exec] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) [exec] at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) [exec] at javax.xml.parsers.SAXParser.parse(SAXParser.java:311) [exec] at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:59) [exec] at org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:42) [exec] at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44) [exec] at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77) [exec] at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117) [exec] at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802) [exec] at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301) [exec] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139) [exec] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) [exec] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) [exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:249) [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [exec] at java.lang.reflect.Method.invoke(Method.java:585) [exec] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) [exec] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) [exec] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) [exec] at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [exec] java.lang.NumberFormatException: For input string: "0,313" [exec] at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224) [exec] at java.lang.Float.parseFloat(Float.java:394) [exec] at org.codehaus.mojo.surefire.ReportTestSuite.startElement(ReportTestSuite.java:78) [exec] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533) [exec] at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:798) [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:878) [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:1157) [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794) [exec] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) [exec] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) [exec] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) [exec] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) [exec] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) [exec] at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) [exec] at javax.xml.parsers.SAXParser.parse(SAXParser.java:311) [exec] at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:59) [exec] at org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:42) [exec] at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44) [exec] at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77) [exec] at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117) [exec] at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802) [exec] at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301) [exec] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139) [exec] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) [exec] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) [exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:249) [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [exec] at java.lang.reflect.Method.invoke(Method.java:585) [exec] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) [exec] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) [exec] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) [exec] at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [exec] java.lang.NullPointerException [exec] at org.codehaus.mojo.surefire.SurefireReportGenerator.constructTestCasesSection(SurefireReportGenerator.java:344) [exec] at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:60) [exec] at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77) [exec] at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:117) [exec] at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802) [exec] at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301) [exec] at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270) [exec] at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139) [exec] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) [exec] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) [exec] at org.apache.maven.cli.MavenCli.main(MavenCli.java:249) [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [exec] at java.lang.reflect.Method.invoke(Method.java:585) [exec] at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) [exec] at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) [exec] at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) [exec] at org.codehaus.classworlds.Launcher.main(Launcher.java:375) [exec] [ERROR] VM #displayTree: error : too few arguments to macro. Wanted 2 got 0 [exec] [ERROR] VM #menuItem: error : too few arguments to macro. Wanted 1 got 0 [exec] [INFO] Generate "Continuous Integration" report. [exec] [INFO] Generate "Dependencies" report. [exec] [INFO] Generate "Issue Tracking" report. [exec] [INFO] Generate "Project License" report. [exec] [INFO] Generate "Mailing Lists" report. [exec] [INFO] Generate "Source Repository" report. [exec] [INFO] Generate "Project Team" report. [exec] [INFO] Generate an index file for the English version. [exec] [INFO] ---------------------------------------------------------------------------- [exec] [INFO] BUILD SUCCESSFUL [exec] [INFO] ----------------------------------------------------------------------------
          Hide
          Carlos Sanchez added a comment -

          the last one is another unrelated issue that has already been solved

          Show
          Carlos Sanchez added a comment - the last one is another unrelated issue that has already been solved
          Hide
          Dan Fabulich added a comment -

          Is there any workaround for this? Is there some way I can skip the first test run and just let surefire-report run the tests for me or something?

          Show
          Dan Fabulich added a comment - Is there any workaround for this? Is there some way I can skip the first test run and just let surefire-report run the tests for me or something?
          Hide
          Brett Porter added a comment -

          you can try putting <skip> into the <build> section. However, this will always skip tests during build (but still run them through site).

          Show
          Brett Porter added a comment - you can try putting <skip> into the <build> section. However, this will always skip tests during build (but still run them through site).
          Hide
          Pascal Magnard added a comment -

          I've got the same issue as Dirk. I added the surefire-report plugin declaration to the reporting section of my pom and each time this plugin is executed, the test phase is invoked. The expected behavior, according to the documentation, would be the surefire plugin to invoke the test phase (http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html) but not the surefire-report plugin (http://maven.apache.org/plugins/maven-surefire-report-plugin/report-mojo.html).
          Having the tests ran twice when invoking mvn clean install site is more than annoying for the project i'm working on because the compilation and the testing are performed twice and they unfortunatly take a big while.

          That would be great if you could provide a mean to prevent from having the surefire-report plugin kicking off a test phase when triggered. Some boolean like 'invokeTest' in the <configuration> section of the plugin would be just fine.

          (And btw, Brett, i've been looking for you solution but was not able to find any <skip> tag in either the Maven 1.1 or Maven 2 POM XML schema.)

          Show
          Pascal Magnard added a comment - I've got the same issue as Dirk. I added the surefire-report plugin declaration to the reporting section of my pom and each time this plugin is executed, the test phase is invoked. The expected behavior, according to the documentation, would be the surefire plugin to invoke the test phase ( http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html ) but not the surefire-report plugin ( http://maven.apache.org/plugins/maven-surefire-report-plugin/report-mojo.html ). Having the tests ran twice when invoking mvn clean install site is more than annoying for the project i'm working on because the compilation and the testing are performed twice and they unfortunatly take a big while. That would be great if you could provide a mean to prevent from having the surefire-report plugin kicking off a test phase when triggered. Some boolean like 'invokeTest' in the <configuration> section of the plugin would be just fine. (And btw, Brett, i've been looking for you solution but was not able to find any <skip> tag in either the Maven 1.1 or Maven 2 POM XML schema.)
          Hide
          Kenny Cheang added a comment -

          I have the same issue. I am using "clean install site" and for some reason, the surefire test is executed four times. This is more than annoying. It considerably slows down the build process because I have some DAO tests against real database.

          I hope Maven can remove all duplicated goals within a single maven command so that people can safely execute something like "mvn clean compile test package install deploy site site-deploy".

          Show
          Kenny Cheang added a comment - I have the same issue. I am using "clean install site" and for some reason, the surefire test is executed four times. This is more than annoying. It considerably slows down the build process because I have some DAO tests against real database. I hope Maven can remove all duplicated goals within a single maven command so that people can safely execute something like "mvn clean compile test package install deploy site site-deploy".
          Hide
          Martin Brunninger added a comment -

          I encountered this too.

          I my eyes, running the test during site generation is no good idea as it modifies content outside the "/target/site" folder. If I run "mvn clean package site" there should be no problem with having no test results. If I run "mvn site" with no test results available, well for me it's ok to have no (or an empty) report in this case. If others like to have the tests done during site generation, I'd see this as an optional configuration as it modifies content outside the "/target/site" folder and is a time issue (especially for larger projects).

          According to Kenny's problem, I assume he is using the surefire, surefire-report and clover plugin (like me). In this case I can explain why the tests are run four times. If you enable the debug output, you will see that clover does something like running a second lifecycle with goal install. So the first time the test are executed, it is done with instrumented code. The second time (in the original) lifecycle the test are run with non-instrumented code. To be honest, from some point of view this makes sense as instrumentation does not influence your tests (especially when making performance tests), but I would like to decide this myself. The second two executions are simple to explain. This is because surefire-report reruns the test (including all prior phases) and this includes instrumentation too.

          Hope this helps.

          Show
          Martin Brunninger added a comment - I encountered this too. I my eyes, running the test during site generation is no good idea as it modifies content outside the "/target/site" folder. If I run "mvn clean package site" there should be no problem with having no test results. If I run "mvn site" with no test results available, well for me it's ok to have no (or an empty) report in this case. If others like to have the tests done during site generation, I'd see this as an optional configuration as it modifies content outside the "/target/site" folder and is a time issue (especially for larger projects). According to Kenny's problem, I assume he is using the surefire, surefire-report and clover plugin (like me). In this case I can explain why the tests are run four times. If you enable the debug output, you will see that clover does something like running a second lifecycle with goal install. So the first time the test are executed, it is done with instrumented code. The second time (in the original) lifecycle the test are run with non-instrumented code. To be honest, from some point of view this makes sense as instrumentation does not influence your tests (especially when making performance tests), but I would like to decide this myself. The second two executions are simple to explain. This is because surefire-report reruns the test (including all prior phases) and this includes instrumentation too. Hope this helps.
          Hide
          Peter Anning added a comment -

          This is a big issue for us. We are migrating a large ant based project to Maven and have 1200 unit tests. If a test fails the only way to find which test has failed is to run the surefire-report:report goal this then re-runs all the tests, which takes a long time. Need a way to get this report plugin to only rerun tests if explicityly asked to. It should just compile a report on the results that are already there, if there are no individual test reports then exit without error. Also is there a way to get the surefire plugin to only create reports for tests that have failed.

          Show
          Peter Anning added a comment - This is a big issue for us. We are migrating a large ant based project to Maven and have 1200 unit tests. If a test fails the only way to find which test has failed is to run the surefire-report:report goal this then re-runs all the tests, which takes a long time. Need a way to get this report plugin to only rerun tests if explicityly asked to. It should just compile a report on the results that are already there, if there are no individual test reports then exit without error. Also is there a way to get the surefire plugin to only create reports for tests that have failed.
          Hide
          Anders Sveen added a comment -

          Same prob, and experiencing excessive build times which is a big problem for our project.

          Show
          Anders Sveen added a comment - Same prob, and experiencing excessive build times which is a big problem for our project.
          Hide
          Chris Hagmann added a comment -

          I would add a second goal (e.g. report-only) which doesn't execute the phase "test". Meaning:

          surefire-report:report (would execute phase "test")
          surefire-report:report-only (doesn't execute phase "test")

          So just to also create a set of test reports without bothering building a site you would configure your pom with this:

          {pre}
          <build>
          <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <executions>
          <execution>
          <phase>test</phase>
          <goals>
          <goal>report-only</goal>
          </goals>
          </execution>
          </executions>
          </plugin>
          </plugins>
          </build>{pre}
          Show
          Chris Hagmann added a comment - I would add a second goal (e.g. report-only) which doesn't execute the phase "test". Meaning: surefire-report:report (would execute phase "test") surefire-report:report-only (doesn't execute phase "test") So just to also create a set of test reports without bothering building a site you would configure your pom with this: {pre} <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <executions> <execution> <phase>test</phase> <goals> <goal>report-only</goal> </goals> </execution> </executions> </plugin> </plugins> </build>{pre}
          Hide
          Chris Hagmann added a comment -

          (Another attempt - JIRA administrator please remove my previous comment)

          I would add a second goal (e.g. report-only) which doesn't execute the phase "test". Meaning:

          surefire-report:report (would execute phase "test")
          surefire-report:report-only (doesn't execute phase "test")

          So just to also create a set of test reports without bothering building a site you would configure your pom with this:

          <build>
            <plugins>
                          <plugin>
                              <groupId>org.apache.maven.plugins</groupId>
                              <artifactId>maven-surefire-report-plugin</artifactId>
                              <executions>
                                  <execution>
                                      <phase>test</phase>
                                      <goals>
                                          <goal>report-only</goal>
                                      </goals>
                                  </execution>
                              </executions>
                          </plugin>
            </plugins>
          </build>
          
          Show
          Chris Hagmann added a comment - (Another attempt - JIRA administrator please remove my previous comment) I would add a second goal (e.g. report-only) which doesn't execute the phase "test". Meaning: surefire-report:report (would execute phase "test") surefire-report:report-only (doesn't execute phase "test") So just to also create a set of test reports without bothering building a site you would configure your pom with this: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <executions> <execution> <phase>test</phase> <goals> <goal>report-only</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
          Hide
          Sasha A added a comment -

          The workaround I've been using is the problem Peter Anning has above is the following. First I run a target that invokes the tests, like:

          mvn test OR mvn install

          Then, if the tests fail, I run:

          mvn -Dmaven.test.skip=true surefire-report:report

          OR

          mvn -Dmaven.test.skip=true site

          Either of these commands runs the surefire report goal without running the tests again. Obviously, this is just a workaround, and it doesn't work well for continuous integration systems that need to run everything automagically, but it has helped me a lot.

          Show
          Sasha A added a comment - The workaround I've been using is the problem Peter Anning has above is the following. First I run a target that invokes the tests, like: mvn test OR mvn install Then, if the tests fail, I run: mvn -Dmaven.test.skip=true surefire-report:report OR mvn -Dmaven.test.skip=true site Either of these commands runs the surefire report goal without running the tests again. Obviously, this is just a workaround, and it doesn't work well for continuous integration systems that need to run everything automagically, but it has helped me a lot.
          Hide
          aaron pieper added a comment -

          After adding the following code to my pom.xml, doing a "mvn install site" only runs the tests once. It is a good workaround if you're using a continuous integration system or can't be bothered to type two things.

          <build>
          <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.0</version>
          <configuration>
          <systemProperties>
          <property>
          <name>maven.test.skip</name>
          <value>true</value>
          </property>
          </systemProperties>
          </configuration>
          </plugin>
          </plugins>
          </build>

          Show
          aaron pieper added a comment - After adding the following code to my pom.xml, doing a "mvn install site" only runs the tests once. It is a good workaround if you're using a continuous integration system or can't be bothered to type two things. <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.0</version> <configuration> <systemProperties> <property> <name>maven.test.skip</name> <value>true</value> </property> </systemProperties> </configuration> </plugin> </plugins> </build>
          Hide
          aaron pieper added a comment -

          Ignore my previously suggested workaround. "mvn install site" was only running the tests once for me because surefire reports were not being included.

          I'm unsure why tests were being run twice since surefire was not in use, but the workaround I suggested does not work.

          Show
          aaron pieper added a comment - Ignore my previously suggested workaround. "mvn install site" was only running the tests once for me because surefire reports were not being included. I'm unsure why tests were being run twice since surefire was not in use, but the workaround I suggested does not work.
          Hide
          Barrie Treloar added a comment -

          Patch as requested by someone to create a "report-only" goal.

          Includes update to index.apt to reference the goal.

          Based on subversion revision 485987.

          Workaround until someone sorts out reactor/forked lifecycle issues.

          Show
          Barrie Treloar added a comment - Patch as requested by someone to create a "report-only" goal. Includes update to index.apt to reference the goal. Based on subversion revision 485987. Workaround until someone sorts out reactor/forked lifecycle issues.
          Hide
          Barrie Treloar added a comment -

          I've added the workaround patch to the trunk which will be included in the 2.3 release.

          Show
          Barrie Treloar added a comment - I've added the workaround patch to the trunk which will be included in the 2.3 release.
          Hide
          Brandon Goodin added a comment -

          I was not able to get report-only to work.

          I have the following in my pom:

          <build>
          ...
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.3-SNAPSHOT</version>
          <executions>
          <execution>
          <phase>test</phase>
          <goals>
          <goal>report-only</goal>
          </goals>
          </execution>
          </executions>
          </plugin>
          ...
          </build>
          <reporting>
          <plugins>
          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.3-SNAPSHOT</version>
          </plugin>
          </plugins>
          ...
          </reporting>
          <pluginRepositories>
          <pluginRepository>
          <id>apache.org</id>
          <name>Maven Plugin Snapshots</name>
          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
          <releases>
          <enabled>false</enabled>
          </releases>
          <snapshots>
          <enabled>true</enabled>
          </snapshots>
          </pluginRepository>
          </pluginRepositories>

          I tried running the surefire-report:report-only goal with SNAPSHOT-2.3 and received the following:

          **************************
          mvn clean install surefire-report:report-only
          [INFO] Scanning for projects...
          [INFO] Searching repository for plugin with prefix: 'surefire-report'.
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Required goal not found: surefire-report:report-only
          [INFO] ------------------------------------------------------------------------
          [INFO] For more information, run Maven with the -e switch
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: < 1 second
          [INFO] Finished at: Thu Feb 15 10:03:39 CST 2007
          [INFO] Final Memory: 1M/3M
          [INFO] ------------------------------------------------------------------------
          **************************

          I tried running the surefire-report:report goal with SNAPSHOT-2.3 and received the following:

          **************************
          mvn clean install surefire-report:report
          [INFO] Scanning for projects...
          [INFO] Searching repository for plugin with prefix: 'surefire-report'.
          [INFO] ----------------------------------------------------------------------------
          [INFO] Building iBATIS SQL Map
          [INFO] task-segment: [clean, install, surefire-report:report]
          [INFO] ----------------------------------------------------------------------------
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD ERROR
          [INFO] ------------------------------------------------------------------------
          [INFO] 'report-only' was specified in an execution, but not found in the plugin
          [INFO] ------------------------------------------------------------------------
          [INFO] For more information, run Maven with the -e switch
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: < 1 second
          [INFO] Finished at: Thu Feb 15 10:05:18 CST 2007
          [INFO] Final Memory: 2M/4M
          [INFO] ------------------------------------------------------------------------
          **************************

          I even removed the executions configuration... still no go.

          Show
          Brandon Goodin added a comment - I was not able to get report-only to work. I have the following in my pom: <build> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.3-SNAPSHOT</version> <executions> <execution> <phase>test</phase> <goals> <goal>report-only</goal> </goals> </execution> </executions> </plugin> ... </build> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.3-SNAPSHOT</version> </plugin> </plugins> ... </reporting> <pluginRepositories> <pluginRepository> <id>apache.org</id> <name>Maven Plugin Snapshots</name> <url> http://people.apache.org/repo/m2-snapshot-repository </url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> I tried running the surefire-report:report-only goal with SNAPSHOT-2.3 and received the following: ************************** mvn clean install surefire-report:report-only [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'surefire-report'. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Required goal not found: surefire-report:report-only [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Thu Feb 15 10:03:39 CST 2007 [INFO] Final Memory: 1M/3M [INFO] ------------------------------------------------------------------------ ************************** I tried running the surefire-report:report goal with SNAPSHOT-2.3 and received the following: ************************** mvn clean install surefire-report:report [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'surefire-report'. [INFO] ---------------------------------------------------------------------------- [INFO] Building iBATIS SQL Map [INFO] task-segment: [clean, install, surefire-report:report] [INFO] ---------------------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] 'report-only' was specified in an execution, but not found in the plugin [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Thu Feb 15 10:05:18 CST 2007 [INFO] Final Memory: 2M/4M [INFO] ------------------------------------------------------------------------ ************************** I even removed the executions configuration... still no go.
          Hide
          Barrie Treloar added a comment -

          I don't know if a snapshot build has been created that includes this patch yet.

          The error message you list would indicate this.

          Your alternative is to create a locally patched version of the plugin.
          That's what I have done and it works fine.

          Show
          Barrie Treloar added a comment - I don't know if a snapshot build has been created that includes this patch yet. The error message you list would indicate this. Your alternative is to create a locally patched version of the plugin. That's what I have done and it works fine.
          Hide
          Brandon Goodin added a comment -

          That would work for me only. However, I have a group of developers that are either Maven skeptics or unfamiliar with Maven. I am attempting to provide them a working and acceptable alternative to our current ant build. I don't want to place a burden of asking them to checkout and patch a plugin. That would not reflect well on Maven. Is is possible to get a more recent SNAPSHOT deployed?

          Show
          Brandon Goodin added a comment - That would work for me only. However, I have a group of developers that are either Maven skeptics or unfamiliar with Maven. I am attempting to provide them a working and acceptable alternative to our current ant build. I don't want to place a burden of asking them to checkout and patch a plugin. That would not reflect well on Maven. Is is possible to get a more recent SNAPSHOT deployed?
          Hide
          Barrie Treloar added a comment -

          Have a read of http://docs.codehaus.org/display/MAVENUSER/Patching+Maven+Plugins
          and http://docs.codehaus.org/display/MAVENUSER/Using+Maven+in+a+corporate+environment.

          It is my opinion that your build should never depend upon snapshot versions.
          And including a snapshot repository can also mean pulling in more snapshot plugins than intended.

          Show
          Barrie Treloar added a comment - Have a read of http://docs.codehaus.org/display/MAVENUSER/Patching+Maven+Plugins and http://docs.codehaus.org/display/MAVENUSER/Using+Maven+in+a+corporate+environment . It is my opinion that your build should never depend upon snapshot versions. And including a snapshot repository can also mean pulling in more snapshot plugins than intended.
          Hide
          Brandon Goodin added a comment -

          Thanks for the feedback. The website (http://maven.apache.org/plugins/maven-surefire-report-plugin/report-mojo.html) is presenting the report-only functionality as though it is available. If you do not intend for people to use it you might want to roll your site documentation back to what is actually available. What is the timeline for a new release? This functionality is very much wanted and being that the project I am working with is an Apache project I'd prefer not to go setting up custom repos to serve up jars for our build. I'd much rather use yours.

          Show
          Brandon Goodin added a comment - Thanks for the feedback. The website ( http://maven.apache.org/plugins/maven-surefire-report-plugin/report-mojo.html ) is presenting the report-only functionality as though it is available. If you do not intend for people to use it you might want to roll your site documentation back to what is actually available. What is the timeline for a new release? This functionality is very much wanted and being that the project I am working with is an Apache project I'd prefer not to go setting up custom repos to serve up jars for our build. I'd much rather use yours.
          Hide
          Brett Porter added a comment -

          Barrie - should this be resolved if it is applied?

          Show
          Brett Porter added a comment - Barrie - should this be resolved if it is applied?
          Hide
          Barrie Treloar added a comment -

          Unfortunately, I don't believe we can mark this resolved as surefire-report:report-only is a workaround.

          More thought was meant to be given to this and lifecycles for Maven 2.1.

          For instance, I want the assembly plugin to use the target/site files so I can grab the html from converted apts.
          To do this, I'd like to bind site to the default lifecyle, which will cause surefire-report to run (with all the re-running of tests that are listed in this defect)

          Show
          Barrie Treloar added a comment - Unfortunately, I don't believe we can mark this resolved as surefire-report:report-only is a workaround. More thought was meant to be given to this and lifecycles for Maven 2.1. For instance, I want the assembly plugin to use the target/site files so I can grab the html from converted apts. To do this, I'd like to bind site to the default lifecyle, which will cause surefire-report to run (with all the re-running of tests that are listed in this defect)
          Hide
          Graham Lea added a comment -

          Regardless of whether this is the best solution or not, it contains the functionality that most people want.

          Please commit it to the Maven repository so we can use it.

          Show
          Graham Lea added a comment - Regardless of whether this is the best solution or not, it contains the functionality that most people want. Please commit it to the Maven repository so we can use it.
          Hide
          Mike Youngstrom added a comment -

          I'm attempting to use report-only but I cannot seem to get maven to only execute "report-only" and not "report". It still executes both report-only and report hence my tests are still being executed again when "report" runs. Any ideas?

          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.3</version>
          <executions>
          <execution>
          <goals>
          <goal>report-only</goal>
          </goals>
          </execution>
          </executions>
          </plugin>

          Show
          Mike Youngstrom added a comment - I'm attempting to use report-only but I cannot seem to get maven to only execute "report-only" and not "report". It still executes both report-only and report hence my tests are still being executed again when "report" runs. Any ideas? <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.3</version> <executions> <execution> <goals> <goal>report-only</goal> </goals> </execution> </executions> </plugin>
          Hide
          Barrie Treloar added a comment -

          This is because 2.4 has not been released yet, so unless you have build a local copy and installed it report-only is not available yet.

          Show
          Barrie Treloar added a comment - This is because 2.4 has not been released yet, so unless you have build a local copy and installed it report-only is not available yet.
          Hide
          Nathan Beyer (Cerner) added a comment -

          If this isn't available with v2.3, then there's a documentation problem, as the "report-only" goal is advertised as available now and available since 2.3. See the following URLs, which as of this posting say 'report-only' is available.

          http://maven.apache.org/plugins/maven-surefire-report-plugin/
          http://maven.apache.org/plugins/maven-surefire-report-plugin/report-only-mojo.html

          Show
          Nathan Beyer (Cerner) added a comment - If this isn't available with v2.3, then there's a documentation problem, as the "report-only" goal is advertised as available now and available since 2.3. See the following URLs, which as of this posting say 'report-only' is available. http://maven.apache.org/plugins/maven-surefire-report-plugin/ http://maven.apache.org/plugins/maven-surefire-report-plugin/report-only-mojo.html
          Hide
          Michael Meyer added a comment -

          Any chance that this functionality will be released soon? Maybe in an alpha version of the plugin?

          Show
          Michael Meyer added a comment - Any chance that this functionality will be released soon? Maybe in an alpha version of the plugin?
          Hide
          Benjamin Bentmann added a comment -

          I'm using Maven 2.0.7 and surefire-report-plugin:2.3. From my experience, "report-only" already works in this version. Mike's problem with the execution of both "report" and "report-only" should be solved by configuring surefire-report under the <reporting> section like this:

          	<reporting>
          		...
          			<plugin>
          				<artifactId>maven-surefire-report-plugin</artifactId>
          				...
          				<reportSets>
          					<reportSet>
          						<reports>
          							<report>report-only</report>
          						</reports>
          					</reportSet>
          				</reportSets>
          			</plugin>
          		...
          	</reporting>
          

          This seems to be in conformance with http://maven.apache.org/pom.html#Reporting, one cannot configure a reporting plugin using the <build> section.

          If I type "mvn site", the tests are not run. However, "report-only" still seems to fork a new lifecycle build. This is not really an issue, but seems unnecessary, at least to me as a Maven novice.

          Show
          Benjamin Bentmann added a comment - I'm using Maven 2.0.7 and surefire-report-plugin:2.3. From my experience, "report-only" already works in this version. Mike's problem with the execution of both "report" and "report-only" should be solved by configuring surefire-report under the <reporting> section like this: <reporting> ... <plugin> <artifactId> maven-surefire-report-plugin </artifactId> ... <reportSets> <reportSet> <reports> <report> report-only </report> </reports> </reportSet> </reportSets> </plugin> ... </reporting> This seems to be in conformance with http://maven.apache.org/pom.html#Reporting , one cannot configure a reporting plugin using the <build> section. If I type "mvn site", the tests are not run. However, "report-only" still seems to fork a new lifecycle build. This is not really an issue, but seems unnecessary, at least to me as a Maven novice.
          Hide
          Mike Youngstrom added a comment -

          That works perfect. You're a genius Benjamin. An example like that should be added to the surefire docs.

          Thanks.

          Show
          Mike Youngstrom added a comment - That works perfect. You're a genius Benjamin. An example like that should be added to the surefire docs. Thanks.
          Hide
          Damien Lecan added a comment -

          Benjamin's example doesn't not work for me. html files for site are not generated.

          I work with surefire 2.3 and if I try to do mvn surefire-report:report-only I get this error :

          [INFO] Searching repository for plugin with prefix: 'surefire-report'.
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Required goal not found: surefire-report:report-only

          Are you sure this should work with Surefire 2.3 ?

          Show
          Damien Lecan added a comment - Benjamin's example doesn't not work for me. html files for site are not generated. I work with surefire 2.3 and if I try to do mvn surefire-report:report-only I get this error : [INFO] Searching repository for plugin with prefix: 'surefire-report'. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Required goal not found: surefire-report:report-only Are you sure this should work with Surefire 2.3 ?
          Hide
          Benjamin Bentmann added a comment -

          surefire and surefire-report are separate JARs, are you sure you use v2.3 of surefire-report? I just retried your example command-line and had no problems. Could you append the switch "-X" to enables Maven's debug output and verify it really states something like
          Configuring mojo 'org.apache.maven.plugins:maven-surefire-report-plugin:2.3:report-only'
          If you still have an older version, appending the switch "-U" should tell Maven to search for updates for the plugins (used to execute the current goal).

          Show
          Benjamin Bentmann added a comment - surefire and surefire-report are separate JARs, are you sure you use v2.3 of surefire-report? I just retried your example command-line and had no problems. Could you append the switch "-X" to enables Maven's debug output and verify it really states something like Configuring mojo 'org.apache.maven.plugins:maven-surefire-report-plugin:2.3:report-only' If you still have an older version, appending the switch "-U" should tell Maven to search for updates for the plugins (used to execute the current goal).
          Hide
          Barrie Treloar added a comment -

          the "report-only" goal has yet to be released, it is targetted for 2.3.1

          Show
          Barrie Treloar added a comment - the "report-only" goal has yet to be released, it is targetted for 2.3.1
          Hide
          Damien Lecan added a comment -

          With forced maven-surefire-report-plugin 2.3, this works nice.
          Thank you

          Show
          Damien Lecan added a comment - With forced maven-surefire-report-plugin 2.3, this works nice. Thank you
          Hide
          Benjamin Bentmann added a comment -

          Just to make sure I have the proper version 2.3, I re-downloaded http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-report-plugin/2.3/maven-surefire-report-plugin-2.3.jar. The plugin.xml contained in this JAR defines a <mojo> with <goal>report-only</goal> that is mapped to a class named SurefireReportOnlyMojo which is also contained in the JAR. Based on these practical observations, I would consider the "report-only" goal to be released

          Show
          Benjamin Bentmann added a comment - Just to make sure I have the proper version 2.3, I re-downloaded http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-report-plugin/2.3/maven-surefire-report-plugin-2.3.jar . The plugin.xml contained in this JAR defines a <mojo> with <goal>report-only</goal> that is mapped to a class named SurefireReportOnlyMojo which is also contained in the JAR. Based on these practical observations, I would consider the "report-only" goal to be released
          Hide
          Fabrice Bellingard added a comment -

          The goal "report-only" actually exists in version 2.3, but when you launch a "mvn install site", you can see that the tests get executed twice. Which is a bug.
          This bug is fixed in SVN. So if you use version 2.3.1-SNAPSHOT, this works perfectly.

          Show
          Fabrice Bellingard added a comment - The goal "report-only" actually exists in version 2.3, but when you launch a "mvn install site", you can see that the tests get executed twice. Which is a bug. This bug is fixed in SVN. So if you use version 2.3.1-SNAPSHOT, this works perfectly.
          Hide
          Luc Willems added a comment -

          is there a way to set the report-only options using
          the cli using -Dxxxxx.report-only=true ?

          this is would fix my automated builds of project sites .

          Show
          Luc Willems added a comment - is there a way to set the report-only options using the cli using -Dxxxxx.report-only=true ? this is would fix my automated builds of project sites .
          Hide
          Benjamin Bentmann added a comment -

          Luc, report-only is not an option/parameter but a plugin goal and these can in general not be directly activated via a property from the CLI. You can however add a profile to your POM that runs report-only and have this profile be activated via a system property.

          Show
          Benjamin Bentmann added a comment - Luc, report-only is not an option/parameter but a plugin goal and these can in general not be directly activated via a property from the CLI. You can however add a profile to your POM that runs report-only and have this profile be activated via a system property.
          Hide
          Luc Willems added a comment -

          indead , i was going to fast here

          i added the report-only option to ALL report entries in my multi module project. still some project rerun
          the complete project ( 20 modules , 3 levels of grandparent/parent/child)
          this is killing my builds and memory

          i also added this for the javadoc plugin because it was doing the same thing

          i basicly want to do "mvn clean deploy site-deploy" every night so we have new deployed artifacts and update project site after
          every (nightly) build cycle.

          for now , the site-deploy stuff is getting to complex because of all this issues

          Show
          Luc Willems added a comment - indead , i was going to fast here i added the report-only option to ALL report entries in my multi module project. still some project rerun the complete project ( 20 modules , 3 levels of grandparent/parent/child) this is killing my builds and memory i also added this for the javadoc plugin because it was doing the same thing i basicly want to do "mvn clean deploy site-deploy" every night so we have new deployed artifacts and update project site after every (nightly) build cycle. for now , the site-deploy stuff is getting to complex because of all this issues
          Hide
          Benjamin Bentmann added a comment -

          Luc, what you describe (forking the entire multi-module build by a single module) looks like unintended usage of aggregator goals. These are goals whose doc pages say "Executes as an aggregator plugin.".

          The goal report-only from the latest Surefire Report Plugin 2.4.3 does not work as as aggregator and hence should not cause you issues. As for the Javadoc Plugin, its latest release 2.5 includes those problematic aggregator goals. Unless you explicitly configured which report goals to execute, all reports from a plugin are executed. So be sure to setup the Javadoc Plugin as outlined in Selective Javadocs Reports and leave the *-aggregate goals out.

          Show
          Benjamin Bentmann added a comment - Luc, what you describe (forking the entire multi-module build by a single module) looks like unintended usage of aggregator goals. These are goals whose doc pages say "Executes as an aggregator plugin.". The goal report-only from the latest Surefire Report Plugin 2.4.3 does not work as as aggregator and hence should not cause you issues. As for the Javadoc Plugin, its latest release 2.5 includes those problematic aggregator goals. Unless you explicitly configured which report goals to execute, all reports from a plugin are executed. So be sure to setup the Javadoc Plugin as outlined in Selective Javadocs Reports and leave the *-aggregate goals out.
          Hide
          Kristian Rosenvold added a comment -

          Fixed with IT in r1062201.

          2.7.2 will be staged for testing in the next 24 hours12 or so, so if you're one of the numerous watchers of this issue you can contribute by testing the staged release.

          Show
          Kristian Rosenvold added a comment - Fixed with IT in r1062201. 2.7.2 will be staged for testing in the next 24 hours12 or so, so if you're one of the numerous watchers of this issue you can contribute by testing the staged release.

            People

            • Assignee:
              Kristian Rosenvold
              Reporter:
              Dirk Sturzebecher
            • Votes:
              88 Vote for this issue
              Watchers:
              68 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: