LinkedDataFragments / Client.Java

A Triple Pattern Fragments client for Java (Jena)
MIT License
8 stars 10 forks source link

Require minimum Java version and ignore tests #9

Closed jnehring closed 7 years ago

jnehring commented 9 years ago

When I download the sources and do mvn package then I get an error:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.244s
[INFO] Finished at: Mon Oct 05 15:12:59 UTC 2015
[INFO] Final Memory: 9M/22M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project ldf-client: Compilation failure: Compilation failure:
[ERROR] /home/vagrant/freme/Client.Java/src/main/java/org/linkeddatafragments/model/LinkedDataFragmentGraphCapabilities.java:[7,5] error: annotations are not supported in -source 1.3
[ERROR] 
[ERROR] (use -source 5 or higher to enable annotations)
[ERROR] /home/vagrant/freme/Client.Java/src/main/java/org/linkeddatafragments/model/LinkedDataFragment.java:[21,30] error: generics are not supported in -source 1.3
[ERROR] 
[ERROR] (use -source 5 or higher to enable generics)
[ERROR] /home/vagrant/freme/Client.Java/src/main/java/org/linkeddatafragments/utils/Config.java:[13,14] error: generics are not supported in -source 1.3
[ERROR] 
[ERROR] (use -source 5 or higher to enable generics)
[ERROR] /home/vagrant/freme/Client.Java/src/main/java/org/linkeddatafragments/solver/OpExecutorLDF.java:[28,9] error: annotations are not supported in -source 1.3

Actually there are way more errors annotations are not supported...

I propose to add this bit to the pom.xml (in the build / plugins section) so it uses java 8 and compiles:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
    </configuration>
</plugin>

I applied the change but I still get errors:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.linkeddatafragments.LinkedDataFragmentsClientTest

Tests run: 9, Failures: 1, Errors: 7, Skipped: 0, Time elapsed: 22.078 sec <<< FAILURE!

Results :

Failed tests:   testSize(org.linkeddatafragments.LinkedDataFragmentsClientTest): expected:<[427670470]> but was:<[377367913]>

Tests in error: 
  testTypeSparql(org.linkeddatafragments.LinkedDataFragmentsClientTest)
  testBasicSparql(org.linkeddatafragments.LinkedDataFragmentsClientTest)
  testSingleJoinSparql(org.linkeddatafragments.LinkedDataFragmentsClientTest)
  testSingleCountPredicateSparql(org.linkeddatafragments.LinkedDataFragmentsClientTest)
  testSingleCountSubjectSparql(org.linkeddatafragments.LinkedDataFragmentsClientTest)
  testSingleCountObjectSparql(org.linkeddatafragments.LinkedDataFragmentsClientTest)
  testLiteralSparql(org.linkeddatafragments.LinkedDataFragmentsClientTest)

Tests run: 9, Failures: 1, Errors: 7, Skipped: 0

Any hint what I can do?

RubenVerborgh commented 9 years ago

Never mind the test failures; the tests at this moment are too fragile as they depend on a public dataset that has changed in the meantime. You can do:

mvn install -DskipTests

We should indeed add the version to pom.xml (but probably just Java 5 or so, which is the minimum version).

agazzarini commented 8 years ago

@RubenVerborgh @jnehring I just submitted a pull request for this issue. However, as @RubenVerborgh said, even without the compiler level (5) issue reported below, the tests are still failing.

RubenVerborgh commented 8 years ago

The tests should probably be removed for now, they are not sufficiently modular.

RubenVerborgh commented 7 years ago

Fixed with #17.