Skip to content
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

Split package in jung-api, jung-graph-impl and demos/samples packages #233

Open
philippecade opened this issue Jun 26, 2019 · 4 comments
Open

Comments

@philippecade
Copy link

Split packages are not allowed from Java 9 anymore. The jsplitpkgscan tool can be used to find split packages.

When executing jsplitpkgscan tool on all the JAR files published on Maven, we get the following result:

digraph "summary" {
   "file:/jung-api-2.1.1.jar"                         -> "edu.uci.ics.jung.graph";
   "file:/jung-graph-impl-2.1.1.jar"                  -> "edu.uci.ics.jung.graph";
   "file:/jung-api-2.1.1.jar"                         -> "edu.uci.ics.jung.graph.util";
   "file:/jung-graph-impl-2.1.1.jar"                  -> "edu.uci.ics.jung.graph.util";
   "file:/jung-3d-demos-2.0.1.jar"                    -> "edu.uci.ics.jung.samples";
   "file:/jung-jai-samples-2.0.1.jar"                 -> "edu.uci.ics.jung.samples";
   "file:/jung-samples-2.1.1.jar"                     -> "edu.uci.ics.jung.samples";
}

The edu.uci.ics.jung.graph and edu.uci.ics.jung.graph.util packages exist both in the jung-api and in the jung-graph-impl JAR files.

@philippecade
Copy link
Author

with version 3.0, this is already reduced:

digraph "summary" {
   "file:/jung-api-3.0-SNAPSHOT.jar"                  -> "edu.uci.ics.jung.graph.util";
   "file:/jung-graph-impl-3.0-SNAPSHOT.jar"           -> "edu.uci.ics.jung.graph.util";
}

philippecade added a commit to SwissAS/jung that referenced this issue Jun 27, 2019
@jrtom
Copy link
Owner

jrtom commented Aug 25, 2019

Thanks for the note; I wasn't aware of this issue. The way that we're likely going to resolve this in 3.0 is to get rid of the graph-impl jar entirely; almost all of the implementation has been delegated to Guava's common.graph, and the rest can just go in the jung-api jar.

As for 2.x, we don't currently have plans to release another version.

@gustavonmartins
Copy link

Hi, I am having the following problem:
[ERROR] module X reads package edu.uci.ics.jung.graph from both jung.graph.impl and jung.api
I do this because in my module-info.java I have both

requires jung.api;
requires jung.graph.impl;

Ive googled for this error and arrived at this issue. I am using version 2.1.1 of your lib and I understand from your conversation that this will not be fixed, so my only option left seems to either

  1. Use version 3.0 as you said above
  2. Kindly ask if you can update version 2.x (you said its not planned, but maybe I have luck :))
  3. Fix this problem somehow by changing some settings in my maven/java setup
  4. Any other option you might recommend

For option 1), I didnt find where to download it. Is there a link you can provide?
If option 2) is not realistic for you, could you give me a tip of what to do as suggested in 3) or 4)?

I'm really lost, so any help would be welcome :)

Thank you so much!

@stikdragon
Copy link

stikdragon commented Dec 17, 2022

I also have this issue. I would like to use JUNG for a fairly trivial use case in a modern java app but the module system prevents me from using it because of two JAR files both exporting the same package
I see the original post was from 3 years ago, is version 3.0 likely to be around any time soon, or is this project effectively dead?

@namoscagnm PS: one option is to turn the JARs you want to use into a single mega-jar. Unpack them all into the same directory and zip them back up into a single jung-combined-2.1.1.jar file. that then becomes a single unnamed module and so Java is happier. It's a bit of a nuisance tho and stops you using package managers :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants