-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #54 Add module-info.java #149
base: master
Are you sure you want to change the base?
Conversation
570e80b
to
9c5d086
Compare
There seems to be some issues with running tests now, anyone got an idea? |
First I thought it has something to do with the new Jena version (I have just updated the Jena version yesterday) But the missing dependency is there (ModelTestBase is within the latest test sources: So I thought I just add a new module in module-info.java for the test as it is a jar for its own (see above), but
didn't work out, seems this JAR is not a module.. hmm...
does not compile either (with same errors) like we do
In addition, during compilation I stumbled over a different warning, which I am uncertain how to resolve: --- maven-compiler-plugin:3.8.1:compile (default-compile) @ odfdom-java ---
which lead me to this article: Anyway, if anybody can assist as I likely will not be able to look at it before next Tuesday! |
To me, it seems I (or we) need additional information to solve this riddle.
Therefore, I have asked them to add module-info.java themselves: Perhaps, when they face the same problem with the java-core-tests classes and are able to fix it at the root. Otherwise, any help is welcome. Won't be able to spend time on this for the next weeks... |
Apache Jena produces modules using automatic module names. What do you use the test artifacts for? The tests do not run without the data files which are not in the test-jar. The test-jars do contain some code used by other parts of Jena. |
@@ -0,0 +1,95 @@ | |||
/* | |||
* Copyright 2022 The Apache Software Foundation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a copy/paste error here:
The Copyright does not belong to ASF but is likely belonging to "The Document Foundation" or you have the copyright.
My thanks to Andy Seabourne, for pointing this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adopt the tiny copy/paste issue - and somehow this should build :-)
Andy Seaborne (of the Apache JENA project) was so kind to the following adjustments for JENA: |
9c5d086
to
459f214
Compare
@smehrbrodt I have tried yesterday with a local build of Jena (including Andys fixes from the PR two days ago) and now there is even a SNAPSHOT release available: https://repository.apache.org/content/repositories/snapshots/org/apache/jena/jena-core/4.4.0-SNAPSHOT/ (both times I got different problems - the usual Maven Surefire plugin crashing the JavaVM likely by System.exit() somewhere... little intransparent the problem...) Any ideas? |
Earlier question: |
Hello Andy, thanks for the reply, yes I have overseen your earlier question, sorry. [ERROR] ./odftoolkit/odfdom/src/test/java/org/odftoolkit/odfdom/pkg/GRDDLTest.java:[42,38] package org.apache.jena.rdf.model.test does not exist Just one question, as I got more specific error messages on Linux (the above VM crash is Windows - I had it before only on my machine). When I wanted to test your latest patch using the SNAPSHOT build, exchanging the Jena version to I get: Any idea or suggestion on how to continue? |
@afs What is strange. Without module-info.java your Jena test classes are found, but with module-info.java the class can no longer be found. Strange, isn'it? |
just tried to build this with 4.4.0-SNAPSHOT twice in pom.xml, i get this very well hidden error message about 2 modules defining the org.w3c.dom.html package (on the terminal it is reported as a JVM startup failure, have to look at a log file to see). Corrupted STDOUT by directly writing to native stream in forked JVM 1. Stream 'java.lang.module.ResolutionException: Modules xercesImpl and jdk.xml.dom export package org.w3c.dom.html to module java.rdfa'. |
It can't see any use of ModelTestBase other than it inherits from junit.framework.TestCase and has a Personally - I'd remove the |
It is modulepath related. No modules - test code on the classpath. Putting reusable test framework in test jars isn't great and may not play with modules but it has been that way for a very long time. |
As suggested in #54, add a module-info to odfdom project, so that users who are using java module based project setup can benefit from this.