Git Product home page Git Product logo

Comments (7)

miasma avatar miasma commented on July 29, 2024

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.

svanteschubert avatar svanteschubert commented on July 29, 2024

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.

  1. xercesImpl-2.12.0.jar & serializer-2.7.2.jar mentioned to be working
  2. 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
  3. No insight on Jena, likely we have to test the latest version and/or build locally with JDK 9 enabled and contribute it back
  4. 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.

svanteschubert avatar svanteschubert commented on July 29, 2024

Damian answered the current RDFa GitHub repository, which is also creating the recent Maven artefact is:
https://github.com/iteggmbh/java-rdfa

from odftoolkit.

wetneb avatar wetneb commented on July 29, 2024

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.

svanteschubert avatar svanteschubert commented on July 29, 2024

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.

wetneb avatar wetneb commented on July 29, 2024

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.

svanteschubert avatar svanteschubert commented on July 29, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.