I got a failure report for uima 2.2.1 as shown below. The error occurs
when running "mvn install" from uimaj. All works fine when running "mvn
install" from uimaj-core.
Test set: org.apache.uima.resource.metadata.impl.Import_implTest
-------------------------------------------------------------------------------
Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.101
sec <<< FAILURE!
testFindAbsoluteUrl(org.apache.uima.resource.metadata.impl.Import_implTest)
Time elapsed: 0.004 sec <<< FAILURE!
junit.framework.AssertionFailedError:
expected:<file:/home/imreg/uimaj-2.2.1-incubating/uimaj/../uimaj-core/foo/bar/MyFile.xml>
but
was:<file:/home/imreg/uimaj-2.2.1-incubating/uimaj-core/foo/bar/MyFile.xml>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:282)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:71)
at
org.apache.uima.resource.metadata.impl.Import_implTest.testFindAbsoluteUrl(Import_implTest.java:123)
I tried to reproduce the error with different JVMs but without success.
When looking at the code I see:
importObj.setLocation("foo/bar/MyFile.xml");
URL absUrl =
importObj.findAbsoluteUrl(UIMAFramework.newDefaultResourceManager());
URL expectedUrl = new File(System.getProperty("user.dir"),
"foo/bar/MyFile.xml").toURL();
assertEquals(expectedUrl, absUrl);
So the expected URL from the report above is:
file:/home/imreg/uimaj-2.2.1-incubating/uimaj/../uimaj-core/foo/bar/MyFile.xml
where
/home/imreg/uimaj-2.2.1-incubating/uimaj/../uimaj-core/
is the System.getProperty("user.dir") part.
Does anyone know details about the representation of the user.dir with
uimaj/../uimaj-core?
-- Michael