veraPDF / veraPDF-library

Industry supported, open source PDF/A validation library
http://verapdf.org/software
GNU General Public License v3.0
268 stars 48 forks source link

Maven build instructions on front page fail #1459

Closed knoami closed 1 month ago

knoami commented 2 months ago

I tried to build the library by following the instructions:

1. git clone https://github.com/veraPDF/veraPDF-library
2. cd veraPDF-library
3. git checkout master

But I got the following errors:


[ERROR] org.verapdf.version.SemanticVersionTest.testGetVersionString -- Time elapsed: 0.003 s <<< FAILURE!
org.junit.ComparisonFailure: expected:<[1.0.0]> but was:<[?.?.?]>
at org.junit.Assert.assertEquals(Assert.java:117)
at org.junit.Assert.assertEquals(Assert.java:146)
at org.verapdf.version.SemanticVersionTest.testGetVersionString(SemanticVersionTest.java:168)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] AuditDurationImplTest.testGetStringDuration:47 expected:<[00:00:00.000]> but was:<[??:??:??.???]>
[ERROR] SemanticVersionTest.testGetVersionString:168 expected:<[1.0.0]> but was:<[?.?.?]>
[INFO]
[ERROR] Tests run: 290, Failures: 2, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for veraPDF PDF/A Validation Library 1.26.0:
[INFO]
[INFO] veraPDF PDF/A Validation Library ................... SUCCESS [ ?.??? s]
[INFO] veraPDF PDF/A XMP Library Core ..................... SUCCESS [ ?.??? s]
[INFO] veraPDF Library core ............................... FAILURE [ ?.??? s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: ??.??? s
[INFO] Finished at: ????-??-??T??:??:??+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on project core:
There are test failures.
[ERROR]
[ERROR] Please refer to D:\Java\veraPDF-library\core\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :core```

So what could be the problem?
MaximPlusov commented 1 month ago

hi @knoami

We'd need to know a little more about your environment. In no particular order:

knoami commented 1 month ago

I am using Windows 11 and here's my default locale:

image

Here's my Java version:


openjdk version "11.0.16.1" 2022-08-12 LTS
OpenJDK Runtime Environment Microsoft-40648 (build 11.0.16.1+1-LTS)
OpenJDK 64-Bit Server VM Microsoft-40648 (build 11.0.16.1+1-LTS, mixed mode)```
MaximPlusov commented 1 month ago

This is looks like as known issue. You can try adding option -Djava.locale.providers=COMPAT to your mvn command.

knoami commented 1 month ago

This is looks like as known issue. You can try adding option -Djava.locale.providers=COMPAT to your mvn command.

Thanks, it works like a charm.

I just changed it to mvn clean install -Djava.locale.providers=COMPAT

and everything is okay now.

knoami commented 1 month ago

thanks