Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
Do not look at "DataStyleTest.java:87" - file contents in my IDE is not the same as in GitHub. 2014-03-03 16:36 GMT+02:00 Антон Мацюк : > If I leave Locale.FRANCE I get this: > > testDays(org.jopendocument.dom.style.data.DataStyleTest) Time elapsed: > 0.172 sec <<< FAILURE! > junit.framework.AssertionFailedError: > expected: > but > was: > at junit.framework.Assert.fail(Assert.java:57) > at junit.framework.Assert.failNotEquals(Assert.java:329) > at junit.framework.Assert.assertEquals(Assert.java:78) > at junit.framework.Assert.assertEquals(Assert.java:86) > at junit.framework.TestCase.assertEquals(TestCase.java:253) > at > org.jopendocument.dom.style.data.DataStyleTest.testDays(DataStyleTest.java:87) > 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:597) > at junit.framework.TestCase.runTest(TestCase.java:176) > at junit.framework.TestCase.runBare(TestCase.java:141) > at junit.framework.TestResult$1.protect(TestResult.java:122) > at junit.framework.TestResult.runProtected(TestResult.java:142) > at junit.framework.TestResult.run(TestResult.java:125) > at junit.framework.TestCase.run(TestCase.java:129) > at junit.framework.TestSuite.runTest(TestSuite.java:255) > at junit.framework.TestSuite.run(TestSuite.java:250) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) > at > org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) > at > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) > 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:597) > at > org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) > at > org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) > at > org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) > at > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) > at > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) > > > 2014-03-03 11:30 GMT+02:00 Sylvain Cuaz : > > Le 02/03/2014 16:37, Антон Мацюк a écrit : >> >> Though, take a look at this: >>> https://github.com/denixx/jOpenDocument-1.3/blob/master/ >>> src/test/java/org/jopendocument/dom/style/data/DataStyleTest.java#L81 >>> >> >> The locale must be France since I want to test that the round trip from >> getDays() and back with getDate() works even for the skipped hour. I.e. I >> know that in France the hour from 2 to 3 AM will be skipped. >> To answer the second question, precisely because I pass Locale.FRANCE, >> this test will succeed on any computer. >> >> Cheers, >> Sylvain >> >> >> -- >> >> --- You received this message because you are subscribed to the Google >> Groups "jOpenDocument" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jopendocument+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
If I leave Locale.FRANCE I get this: testDays(org.jopendocument.dom.style.data.DataStyleTest) Time elapsed: 0.172 sec <<< FAILURE! junit.framework.AssertionFailedError: expected: but was: at junit.framework.Assert.fail(Assert.java:57) at junit.framework.Assert.failNotEquals(Assert.java:329) at junit.framework.Assert.assertEquals(Assert.java:78) at junit.framework.Assert.assertEquals(Assert.java:86) at junit.framework.TestCase.assertEquals(TestCase.java:253) at org.jopendocument.dom.style.data.DataStyleTest.testDays(DataStyleTest.java:87) 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:597) at junit.framework.TestCase.runTest(TestCase.java:176) at junit.framework.TestCase.runBare(TestCase.java:141) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) 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:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) 2014-03-03 11:30 GMT+02:00 Sylvain Cuaz : > Le 02/03/2014 16:37, Антон Мацюк a écrit : > > Though, take a look at this: >> https://github.com/denixx/jOpenDocument-1.3/blob/master/ >> src/test/java/org/jopendocument/dom/style/data/DataStyleTest.java#L81 >> > > The locale must be France since I want to test that the round trip from > getDays() and back with getDate() works even for the skipped hour. I.e. I > know that in France the hour from 2 to 3 AM will be skipped. > To answer the second question, precisely because I pass Locale.FRANCE, > this test will succeed on any computer. > > Cheers, > Sylvain > > > -- > > --- You received this message because you are subscribed to the Google > Groups "jOpenDocument" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jopendocument+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
Le 02/03/2014 16:37, Антон Мацюк a écrit : Though, take a look at this: https://github.com/denixx/jOpenDocument-1.3/blob/master/src/test/java/org/jopendocument/dom/style/data/DataStyleTest.java#L81 The locale must be France since I want to test that the round trip from getDays() and back with getDate() works even for the skipped hour. I.e. I know that in France the hour from 2 to 3 AM will be skipped. To answer the second question, precisely because I pass Locale.FRANCE, this test will succeed on any computer. Cheers, Sylvain -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
Though, take a look at this: https://github.com/denixx/jOpenDocument-1.3/blob/master/src/test/java/org/jopendocument/dom/style/data/DataStyleTest.java#L81 суббота, 1 марта 2014 г., 21:03:41 UTC+2 пользователь guillaume...@gmail.com написал: > > Hi, > > thank you for your contribution. > Maven fans will appreciate :) > > Best regards, > > Guillaume > > > 2014-03-01 19:36 GMT+01:00 Антон Мацюк > > : > >> And sorry for this period of inactivity - I was doing my job ;) >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "jOpenDocument" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jopendocumen...@googlegroups.com . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
Hi, thank you for your contribution. Maven fans will appreciate :) Best regards, Guillaume 2014-03-01 19:36 GMT+01:00 Антон Мацюк : > And sorry for this period of inactivity - I was doing my job ;) > > -- > > --- > You received this message because you are subscribed to the Google Groups > "jOpenDocument" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jopendocument+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
And sorry for this period of inactivity - I was doing my job ;) -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
This is a Maven-based project, which builds jar and uberjar. -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
Hi guys. Please examine this: https://github.com/denixx/jOpenDocument-1.3 Let me know if something is wrong. -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
I have done rebuilding sources to maven. Will publish results to github at weekend. -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
One more question: I am trying to run tests in jOD sources version 1.2. I've won in battle with RELAX NG, just used jing-2009 and changed JDOMUtils to public static String isValid(final Document doc, final String > schemaLanguage, final URL schemaLocation) throws SAXException { > ByteArrayInputStream ins; > StreamSource strsou = null; > //System.out.println("-=-=- schemaLanguage: '"+schemaLanguage+"', > schemaLocation: '"+schemaLocation+"'"); > try { > ins = new ByteArrayInputStream(output(doc).getBytes("UTF8")); > strsou = new StreamSource(ins); > } catch (UnsupportedEncodingException e) { > throw new IllegalStateException("unicode not found ", e); > } > XMLSyntaxSchemaFactory factory = new XMLSyntaxSchemaFactory(); > //final Schema schema = > SchemaFactory.newInstance(schemaLanguage).newSchema(schemaLocation); > try { > // don't use JDOMSource since it's as inefficient as this plus > we can't control the > // output. > //schema.newValidator().validate(new StreamSource(ins)); > > factory.newSchema(schemaLocation).newValidator().validate(strsou); > return null; > } catch (Exception e) { > return ExceptionUtils.getStackTrace(e); > } > } Now only one test fails: at org.jopendocument.dom.spreadsheet.SheetTest.testName(SheetTest.java:127) junit.framework.AssertionFailedError: expected same:< xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" > table:name="users" table:style-name="ta1" table:print="false"> > xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" > xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" > form:automatic-focus="false" form:apply-design-mode="false" /> > table:default-cell-style-name="Default" /> > table:default-cell-style-name="Default" /> > table:default-cell-style-name="Default" /> > table:default-cell-style-name="Default" /> > > > >> was not:< xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" > table:name="newSheet"> table:default-cell-style-name="Default" > />> > at junit.framework.Assert.fail(Assert.java:57) > at junit.framework.Assert.failNotSame(Assert.java:325) > at junit.framework.Assert.assertSame(Assert.java:288) > at junit.framework.Assert.assertSame(Assert.java:296) > at junit.framework.TestCase.assertSame(TestCase.java:465) > at org.jopendocument.dom.spreadsheet.SheetTest.testName(SheetTest.java:127) > ... Is this something which necessarily should be fixed? I should try to run tests with unchanged jOD-src-package... -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
Gotcha! I make stupid thing trying to compile soruces with jdk 1.7 :) With 1.6 it compiles successfully. -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
> > > > > > > > Use "encoding" argument in "javac"-tag. Ant tries to read sources in system encoding (cp1251 for Russian Windows) if this attribute not present. -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
> > denixx@denixxwork:~> java -version > > java version "1.7.0_45" > > Java(TM) SE Runtime Environment (build 1.7.0_45-b18) > > Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) > > denixx@denixxwork:~> /home/denixx/soft/apache-ant-1.9.2/bin/ant -version > > Apache Ant(TM) version 1.9.2 compiled on July 8 2013 > > denixx@denixxwork:~> cd >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/ > > denixx@denixxwork:~/NetBeansProjects/jOpenDocument-src-1.3> >> /home/denixx/soft/apache-ant-1.9.2/bin/ant jar > > Buildfile: /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build.xml > > >> init: > > >> dist.init: > >[delete] Deleting directory >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/dist > > [mkdir] Created dir: >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/dist > > >> distJava5.ok: > > >> distJava5.nok: > > [echo] Not building for java 5 since jre5.dir is not defined > > >> distJava5: > > >> distJava6: > > [echo] Building JDK6 version > >[delete] Deleting directory >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build > > [mkdir] Created dir: >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build > > [javac] >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build.xml:49: warning: >> 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set >> to false for repeatable builds > > [javac] Compiling 689 source files to >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build > > [javac] >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/src/org/jopendocument/dom/Library.java:649: >> >> error: name clash: canBeMerged(Map,Map) in >> EmbeddedLibrary and canBeMerged(Map,Map) in >> Library have the same erasure, yet neither hides the other > > [javac] static private final boolean canBeMerged(final >> Map m1, final Map m2) { > > [javac] ^ > > [javac] where V is a type-variable: > > [javac] V extends Object declared in method >> canBeMerged(Map,Map) > > It not helped :( -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
Hi, upgrade your JDK. Regards, Guillaume 2013/10/23 Антон Мацюк > denixx@denixxwork:~/NetBeansProjects/jOpenDocument-src-1.3> >>> /home/denixx/soft/netbeans-7.3.1/java/ant/bin/ant >> >> Buildfile: /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build.xml >> >> >>> init: >> >> >>> dist.init: >> >> [mkdir] Created dir: >>> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/dist >> >> >>> distJava5.ok: >> >> >>> distJava5.nok: >> >> [echo] Not building for java 5 since jre5.dir is not defined >> >> >>> distJava5: >> >> >>> distJava6: >> >> [echo] Building JDK6 version >> >> [mkdir] Created dir: >>> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build >> >> [javac] >>> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build.xml:49: warning: >>> 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set >>> to false for repeatable builds >> >> [javac] Compiling 689 source files to >>> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build >> >> [javac] >>> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/src/org/jopendocument/dom/Library.java:649: >>> error: name clash: canBeMerged(Map,Map) in >>> EmbeddedLibrary and canBeMerged(Map,Map) in >>> Library have the same erasure, yet neither hides the other >> >> [javac] static private final boolean canBeMerged(final >>> Map m1, final Map m2) { >> >> [javac] ^ >> >> [javac] where V is a type-variable: >> >> [javac] V extends Object declared in method >>> canBeMerged(Map,Map) >> >> > I have one error when trying to build from sources. > I even have no idea what it is about :) > Also it shows a lot of warnings, but who cares about them ;) > > denixx@denixxwork:~/NetBeansProjects/jOpenDocument-src-1.3> >>> /home/denixx/soft/netbeans-7.3.1/java/ant/bin/ant -version >> >> Apache Ant(TM) version 1.8.4 compiled on May 22 2012 >> >> > I'll appreciate some help. > > -- > > --- > You received this message because you are subscribed to the Google Groups > "jOpenDocument" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jopendocument+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?
> > denixx@denixxwork:~/NetBeansProjects/jOpenDocument-src-1.3> >> /home/denixx/soft/netbeans-7.3.1/java/ant/bin/ant > > Buildfile: /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build.xml > > >> init: > > >> dist.init: > > [mkdir] Created dir: >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/dist > > >> distJava5.ok: > > >> distJava5.nok: > > [echo] Not building for java 5 since jre5.dir is not defined > > >> distJava5: > > >> distJava6: > > [echo] Building JDK6 version > > [mkdir] Created dir: >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build > > [javac] >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build.xml:49: warning: >> 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set >> to false for repeatable builds > > [javac] Compiling 689 source files to >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/build > > [javac] >> /home/denixx/NetBeansProjects/jOpenDocument-src-1.3/src/org/jopendocument/dom/Library.java:649: >> >> error: name clash: canBeMerged(Map,Map) in >> EmbeddedLibrary and canBeMerged(Map,Map) in >> Library have the same erasure, yet neither hides the other > > [javac] static private final boolean canBeMerged(final >> Map m1, final Map m2) { > > [javac] ^ > > [javac] where V is a type-variable: > > [javac] V extends Object declared in method >> canBeMerged(Map,Map) > > I have one error when trying to build from sources. I even have no idea what it is about :) Also it shows a lot of warnings, but who cares about them ;) denixx@denixxwork:~/NetBeansProjects/jOpenDocument-src-1.3> >> /home/denixx/soft/netbeans-7.3.1/java/ant/bin/ant -version > > Apache Ant(TM) version 1.8.4 compiled on May 22 2012 > > I'll appreciate some help. -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.