Re: [jopendocument] Re: jOpenDocument is a uberjar? Why? Why not use Maven to build jars?

2014-03-03 Thread Антон Мацюк
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:java.util.GregorianCalendar[time=1393803027854,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=Europe/Kiev,offset=1080,dstSavings=0,useDaylight=false,transitions=67,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=2,WEEK_OF_YEAR=10,WEEK_OF_MONTH=1,DAY_OF_MONTH=3,DAY_OF_YEAR=62,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=2,HOUR_OF_DAY=2,MINUTE=30,SECOND=27,MILLISECOND=854,ZONE_OFFSET=1080,DST_OFFSET=0]
but
was:java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=Europe/Kiev,offset=1080,dstSavings=0,useDaylight=false,transitions=67,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=1,ERA=?,YEAR=2014,MONTH=?,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=?,DAY_OF_YEAR=62,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=2,MINUTE=30,SECOND=27,MILLISECOND=854,ZONE_OFFSET=?,DST_OFFSET=?]
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 sylv...@ilm-informatique.fr:

 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?

2014-03-03 Thread Антон Мацюк
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 Антон Мацюк denixx.bay...@gmail.com:

 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:java.util.GregorianCalendar[time=1393803027854,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=Europe/Kiev,offset=1080,dstSavings=0,useDaylight=false,transitions=67,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=2,WEEK_OF_YEAR=10,WEEK_OF_MONTH=1,DAY_OF_MONTH=3,DAY_OF_YEAR=62,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=2,HOUR_OF_DAY=2,MINUTE=30,SECOND=27,MILLISECOND=854,ZONE_OFFSET=1080,DST_OFFSET=0]
 but
 was:java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=Europe/Kiev,offset=1080,dstSavings=0,useDaylight=false,transitions=67,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=1,ERA=?,YEAR=2014,MONTH=?,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=?,DAY_OF_YEAR=62,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=2,MINUTE=30,SECOND=27,MILLISECOND=854,ZONE_OFFSET=?,DST_OFFSET=?]
  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 sylv...@ilm-informatique.fr:

 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?

2014-03-02 Thread Антон Мацюк
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 Антон Мацюк denixx...@gmail.com javascript:
 :

 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 javascript:.
 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?

2014-03-01 Thread Антон Мацюк
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?

2014-03-01 Thread Guillaume Maillard
Hi,

thank you for your contribution.
Maven fans will appreciate :)

Best regards,

Guillaume


2014-03-01 19:36 GMT+01:00 Антон Мацюк denixx.bay...@gmail.com:

 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?

2013-10-28 Thread Антон Мацюк
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?

2013-10-25 Thread Антон Мацюк
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:table:table 
 xmlns:table=urn:oasis:names:tc:opendocument:xmlns:table:1.0 
 table:name=users table:style-name=ta1 table:print=false
 office:forms 
 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:table-column table:style-name=co6 
 table:default-cell-style-name=Default /
 table:table-column table:style-name=co7 
 table:default-cell-style-name=Default /
 table:table-column table:style-name=co8 
 table:default-cell-style-name=Default /
 table:table-column table:style-name=co9 
 table:default-cell-style-name=Default /
 table:table-row table:style-name=ro1
  table:table-cell table:number-columns-repeated=4 /
 /table:table-row
/table:table was not:table:table 
 xmlns:table=urn:oasis:names:tc:opendocument:xmlns:table:1.0 
 table:name=newSheettable:table-column 
 table:default-cell-style-name=Default 
 /table:table-rowtable:table-cell //table:table-row/table:table
 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?

2013-10-24 Thread Антон Мацюк


 javac encoding=UTF-8 srcdir=src/ destdir=build
 compilerarg value=-Xlint:deprecation /
 compilerarg value=-Xlint:unchecked /
 classpath
 fileset dir=lib includes=**/*.jar /
 /classpath
 /javac


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?

2013-10-24 Thread Антон Мацюк
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?

2013-10-23 Thread Guillaume Maillard
Hi,

upgrade your JDK.

Regards,
Guillaume


2013/10/23 Антон Мацюк denixx.bay...@gmail.com

 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: VcanBeMerged(MapString,V,MapString,V) in
 EmbeddedLibrary and canBeMerged(MapString,Library,MapString,Library) in
 Library have the same erasure, yet neither hides the other

 [javac] static private final V boolean canBeMerged(final
 MapString, V m1, final MapString, V m2) {

 [javac]  ^

 [javac]   where V is a type-variable:

 [javac] V extends Object declared in method
 VcanBeMerged(MapString,V,MapString,V)


 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.