Comments (7)
At least for my simple use case, adding the following src/main/java/module-info.java
seemed to work:
module org.odftoolkit.odfdom {
requires java.desktop;
requires java.logging;
requires java.xml;
requires java.rdfa;
requires xercesImpl;
requires org.json;
requires org.slf4j;
requires org.apache.jena.core;
requires org.apache.commons.compress;
requires org.apache.commons.lang3;
requires commons.validator;
requires serializer;
exports org.odftoolkit.odfdom;
// and other exported packages
}
I had to disable the tests java/org/odftoolkit/odfdom/pkg/GRDDLTest.java
and java/org/odftoolkit/odfdom/pkg/RDFMetadataTest.java
since I couldn't figure out how to make the jena-core:tests visible (related: jetty/jetty.project#3080). While this is nice to have, it still won't work properly until [xercesImpl-2.12.0.jar, serializer-2.7.2.jar, java-rdfa-1.0.0-BETA1.jar, commons-validator-1.6.jar] have also migrated.
from odftoolkit.
Hello Miasma,
Thank you for your contribution and insights.
So all our dependent project JARS you mentioned need to be transitioned to JDK 9 prior as well.
- xercesImpl-2.12.0.jar & serializer-2.7.2.jar mentioned to be working
- commons-validator-1.6.jar release notes for 1.7 mention a breaking change due to JDK 9 local usage - indicated they have JDK9 on the radar - I have not tested, but optimistic
- No insight on Jena, likely we have to test the latest version and/or build locally with JDK 9 enabled and contribute it back
- java-rdfa-1.0.0-BETA1.jar is from Damian Steer, who I once met. I just have written him about JDK 9 modules and the repo of
https://repo1.maven.org/maven2/net/rootdev/java-rdfa/1.0.0-BETA1/
as the former repo seems still very old:
https://github.com/shellac/java-rdfa
(Update: https://github.com/iteggmbh/java-rdfa is the current repo)
Any further information & help is most welcome.
Best regards,
Svante
from odftoolkit.
Damian answered the current RDFa GitHub repository, which is also creating the recent Maven artefact is:
https://github.com/iteggmbh/java-rdfa
from odftoolkit.
I am new to Java 9 modularity, but I thought the following workaround could be of interest to others:
If your project depends on odftoolkit and your IDE reports compilation errors due to Java modularity, you might want to exclude the xml-apis
dependency from odftoolkit, which duplicates native libraries already provided by another module, as follows (for Maven):
<dependency>
<groupId>org.odftoolkit</groupId>
<artifactId>odfdom-java</artifactId>
<version>0.9.0-RC1</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
from odftoolkit.
Is anyone able to provide a pull request that enables Java 9 modularity?
Or at least provide a pull request where we can iterate upon and list the remaining problems?
from odftoolkit.
I would like to understand what is the need you are looking into fulfilling here. I think Java 9 modularity can be "enabled" by adding some basic module metadata in module-info.java
as mentioned by @miasma, but I do not know if such a setup would actually solve the issue you have in mind?
In other words, I would like to understand in which scenarios it is important to users that this Java 9 modularity is used.
from odftoolkit.
@wetneb Personally, I have no special use case in mind. I am happy to solve it with a patch based on the draft in the beginning. :-)
When I did a quick test in VSCode to add the initially mentioned src/main/java/module-info.java I got a lot of errors, that some of the above mentioned would be not modules. That lead to my previous request for feedback/help.
from odftoolkit.
Related Issues (20)
- Enabling Source Generation for XML attributes with different types dependent on element parent
- ODF Validator dependency <type>pom</type>
- Integrate ODF Validator using Maven HOT 7
- Iterate cells HOT 2
- Cloning fails on Windows HOT 3
- OdfTableCell.getDisplayText() includes comment timestamp and text. HOT 3
- Incorrect behavior of OdfElement.getTextContent() HOT 3
- Unable to replace paragraph in ODF Text Document HOT 11
- Removing "incubator" package name (incompatible API change)
- Setting stringValue or displayText in table cell resets horizontal alignment to left HOT 1
- Determine font, font size, bold/italic/underline styles HOT 2
- Diskussion Forum HOT 1
- OdfEditableTextExtractor extracts only a last part of the text HOT 1
- Character encoding error when creating new spreadsheet HOT 2
- Fix OSGI Implementation Details
- Help Request: Formating cells in an ODF-Table HOT 1
- Bad link in README HOT 1
- Bad links in JavaDoc HOT 2
- Release file can't be built due to lack of .git HOT 3
- Help request: How to display the date and time in a cell at the same time? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odftoolkit.