jung
jung copied to clipboard
Split package in jung-api, jung-graph-impl and demos/samples packages
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.
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";
}
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.
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
- Use version 3.0 as you said above
- Kindly ask if you can update version 2.x (you said its not planned, but maybe I have luck :))
- Fix this problem somehow by changing some settings in my maven/java setup
- 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!
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 :(