[ https://issues.apache.org/jira/browse/UIMA-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465586 ]
Adam Lally commented on UIMA-198: --------------------------------- This is due to Maven bug http://jira.codehaus.org/browse/MSUREFIRE-148, which has been fixed in their latest 3.2-SNAPSHOT. We could either change our POM to use the snapshot version, or live with running "mvn install" instead of "mvn test". The actualy problem is a bit convoluted. There is a difference between "mvn install" and "mvn test" in terms of where they obtain jar files for dependencies. If you run "mvn install", when it gets around to running the uimaj-cpe unit tests, then the classpath it uses will refer to uimaj-core.jar file from the uimaj-core/target directory (i.e. the one that was just built by this same mvn install command). However, if you run "mvn test", then the classpath refers to uimaj-core.jar from your local Maven repo (on Windows, by default this is under c:/Documents and Settings/.m2/repo/). Why does this matter? Well, bug MSUREFIRE-148 is that spaces in the classpath aren't processed properly by the ClassLoader used by the Maven surefire plugin (the thing that runs the test cases). So this comes into play when jars are being loaded from "Documents and Settings". When the CPE tests run and UIMA tries to load its XML Schema file from uimaj-core.jar, the call to Class.getResource() returns a URL jar:file:c:/Document and Settings/... which is not a valid URL due to containing unescaped spaces. This is passed to the XML parser which fails to locate the schema file, resulting in test failures. > CPE Test Cases fail when run with "mvn test" > -------------------------------------------- > > Key: UIMA-198 > URL: https://issues.apache.org/jira/browse/UIMA-198 > Project: UIMA > Issue Type: Bug > Components: Collection Processing > Reporter: Adam Lally > Priority: Minor > > There are tests in cpm, which only fail with > > mvn test > but not with > > mvn install > Or when run from Eclipse. > The failing tests are: > org.apache.uima.collection.impl.CollectionProcessingEngine_implTest > org.apache.uima.collection.impl.cpm.SofaCPE_SofaUnawareCC_Test > org.apache.uima.collection.impl.cpm.SofaCPE_Test > org.apache.uima.collection.impl.cpm.SofaMixedCPE_Test -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira