Some tracks may be about your problem:
* Do you an IDE to edit your files ? If not, Eclipse detects "unusual" characters and may be it could be helpful here. I know that I sometimes generated special characters with a key combination that I've never understood and eclipse was detecting them at once. * I guess you use local as en_US since I see this: Generate an index file for the English version ?
* Do you have a special local set when writing your files ?
* If you make a checkout of the code, do you have special options when checking out ? * If you still have the faulty files (xml ones I mean) may be you can launch under cygwin (you are under windows from what I see): cat -A file which will show you all characters in the file and may be you can detect some undesired characters... * you say that some files "do not work". Tests are failing ? they were running fine on another machine ? if yes, how were they ran ? manually ? from an ide ?

About the plugin, I use it "as it is" so I can't help you about configuration. From what I've seen (I'm not an experienced user !) I understand that running unit tests consist in executing each test one by one and successful build for the plugin means that it can reach the end of the run, not that there is no failure...

Hope that one of the items can help.

Boris

Thorsten Heit a écrit :
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello list,

when executing "mvn site" using the snapshot version of the
surefire-report-maven-plugin, I get two exceptions on my console
window:

<reporting>
  <plugins>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>surefire-report-maven-plugin</artifactId>
      <version>2.0-beta-2-SNAPSHOT</version>
    </plugin>
    (...)
  </plugins>
</reporting>



[INFO] Generate "JDepend" report.
[INFO] Generate "JavaNCSS Report" report.
[DEBUG] Calling NCSSExecuter with src    : c:\devel\base-maven\src\main\java
[DEBUG] Calling NCSSExecuter with output : 
c:\devel\base-maven\target\site\javancss-raw-report.xml
[INFO] Generate "Maven Surefire Report" report.java.lang.Exception: Failure to 
parse file at:
c:\devel\base-maven\target\surefire-reports\TEST-com.xtramind.common.config.test.DefaultConfigManagerTest.xml
        at 
org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:66)
        at 
org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:49)
        at 
org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44)
        at 
org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77)
        at 
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
        at 
org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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 org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 
0x8) was found in the element content of the document.
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
        at 
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1672)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:311)
        at 
org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:62)
        ... 24 more
java.lang.Exception: Failure to parse file at: 
c:\devel\base-maven\target\surefire-reports\TEST-com.xtramind.common.resource.test.DefaultResourceManagerTest.xml
        at 
org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:66)
        at 
org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:49)
        at 
org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44)
        at 
org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77)
        at 
org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
        at 
org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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 org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 
0x8) was found in the element content of the document.
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
        at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
        at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
        at 
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1672)
        at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:311)
        at 
org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:62)
        ... 24 more
[INFO] Generate "Tag List" report.
[INFO] Generate an index file for the English version.

Unfortunately that's all I see, even with "mvn -e -X".

The two test classes mentioned in the stack trace don't actually work on
my machine; some methods in these classes fail and throw an exception.
It seems to me that the invalid character is a tab character that is
automatically printed in the exception stack trace, i.e. in the
TEST-...xml file there's something like the following:

  <testcase time="0,656" name="testInit">
    <error 
type="java.lang.ExceptionInInitializerError">java.lang.ExceptionInInitializerError
        at 
com.xtramind.common.util.ejb.HomeFactory.lookupHome(HomeFactory.java:90)
        at 
com.xtramind.common.config.EjbRegistry.lookupManager(EjbRegistry.java:210)
        at com.xtramind.common.config.EjbRegistry.lookup(EjbRegistry.java:137)
...


Interestingly there are actually more than these two classes above that
don't pass unit testing. So now I wonder:

1) What is causing the two exceptions? I only see these two.
2) When Maven has finished it seems that the surefire report was created
   successfully despite these exceptions. Is there a reason for this?


BTW:

Is the report plugin configurable in any way? I haven't seen any
information about it (or I haven't found it yet ;-))
I'm asking because the source tree I'm compiling is quite huge, and the
entries under "Package List" on the report page are listed in a random
order, i.e. not sorted for example alphabetically.


Regards and thanks for any hint

Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEIwOMQvObkgCcDe0RAoh5AKCUrbp0D9Tkb4oJEwpoFb2NSvTvMwCeJraZ
pEc9BUHf6oP4840JOED5Kt8=
=ZqML
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to