gephi-toolkit icon indicating copy to clipboard operation
gephi-toolkit copied to clipboard

gephi-toolkit sbt build fails

Open move-tool opened this issue 9 years ago • 13 comments

When trying to add a gephi-toolkit dependency from sbt; I get unresolved dependencies errors. Could you please advice on the ways of fixing it.

Here is a mock build.sbt executed with sbt compile

name := "test"

organization := "test"

version := "0.1-SNAPSHOT"

scalaVersion := "2.11.7"


libraryDependencies += "org.gephi" % "gephi-toolkit" % "0.9.1"

resolvers += Resolver.sonatypeRepo("public")

Here is the resulting error:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.netbeans.modules#org-netbeans-modules-masterfs;RELEASE81: not found
[warn]  :: org.netbeans.modules#org-netbeans-core-startup;RELEASE81: not found
[warn]  :: org.netbeans.modules#org-netbeans-core;RELEASE81: not found
[warn]  :: org.netbeans.api#org-openide-util-lookup;RELEASE81: not found
[warn]  :: org.netbeans.api#org-openide-util;RELEASE81: not found
[warn]  :: org.netbeans.api#org-openide-filesystems;RELEASE81: not found
[warn]  :: net.java.dev#stax-utils;snapshot-20100402: not found
[warn]  :: gnu.trove#trove;2.1.0: not found
[warn]  :: org.netbeans.api#org-openide-util-ui;RELEASE81: not found
[warn]  :: org.netbeans.api#org-openide-dialogs;RELEASE81: not found
[warn]  :: org.netbeans.api#org-openide-nodes;RELEASE81: not found
[warn]  :: org.netbeans.api#org-netbeans-api-annotations-common;RELEASE81: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

move-tool avatar Mar 14 '16 01:03 move-tool

The netbeans dependencies are resolved using the following resolver:

"netbeans repository" at "http://bits.netbeans.org/nexus/content/groups/netbeans/"

Unfortunately the other two I was not able to work out. The jars appear to be available here, but I wasn't even able to get it to work by putting them in my /lib directory.

Stax-utils: https://java.net/projects/stax-utils/downloads/directory/Latest

Gnu Trove (old version 2.1.0) https://sourceforge.net/projects/trove4j/files/trove/2.1.0/

zakpatterson avatar Apr 22 '16 20:04 zakpatterson

I struggled with this too. In the end I had to just manually put the whole gephi-toolkit-0.9.1-all.jar into my /lib directory and not have any managed dependencies in my build.sbt

wai-chuen avatar Jun 20 '16 23:06 wai-chuen

I've ended up making a "wrapper" sbt package for it.

On Tue, Jun 21, 2016 at 8:49 AM, Wai-chuen [email protected] wrote:

I struggled with this too. In the end I had to just manually put the whole gephi-toolkit-0.9.1-all.jar into my /lib directory and not have any managed dependencies in my build.sbt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gephi/gephi-toolkit/issues/16#issuecomment-227303192, or mute the thread https://github.com/notifications/unsubscribe/AAwdkoD2ruDOfO-SEslA_aU8ysm3c1mvks5qNybzgaJpZM4Hvsch .

neil-rubens avatar Jun 21 '16 11:06 neil-rubens

This issue still exists and prevents me from using the toolkit in my project. I tried putting the JAR in my "lib/" folder directly but this produces weird errors related to Guice whenever I start the application that uses Gephi. It's really a shame, because Gephi is the only Java/Scala library which provides that many Graph algorithm (for centralities and community detection, among others). Any solution?

frobinet avatar Sep 24 '16 21:09 frobinet

neil-rubens, any chance you can explain how you made it work?

frobinet avatar Sep 24 '16 21:09 frobinet

We just created our own maven repository (actually just a directory on an aws server with the maven directory structure) and put the jar file downloaded from here in there under a different version tag, like "0.9.1-ourco"

Then we just use an sftp resolver in sbt to get it

zakpatterson avatar Sep 25 '16 00:09 zakpatterson

Ok thanks. I don't think it will resolve my issue though, because just putting the jar in the "lib/" folder prevents my Play Framework 2 app from launching with a weird error

play_gephi_error

The error goes away as soon as I remove the JAR from "lib/", even though my code doesn't even reference Gephi.

frobinet avatar Sep 25 '16 07:09 frobinet

There might be problems with duplicated classes in your classpath or something. The toolkit packages several third party dependencies in one big jar for easy use, but you still can depend on the exact modules from Gephi that you need. They are in maven central.

Check the pom used to build the toolkit: https://github.com/gephi/gephi-toolkit/blob/3335d570a6c55c7be251a1891373238e21a8a6af/pom.xml

eduramiba avatar Sep 26 '16 08:09 eduramiba

Maybe we should repackage all dependencies to something like org.gephi.thirdparty to avoid problems, with https://sonatype.github.io/jarjar-maven-plugin

eduramiba avatar Sep 26 '16 08:09 eduramiba

@frobinet I had to manually repackage a new .jar without the conflicting dependencies (https://drive.google.com/file/d/0B3jMBP69IYDMc1QzSUlDQUVoZVU/view?usp=sharing). The conflicts will probably be different for your project, so you might have to unpack the original .jar and repack it yourself to suit.

wai-chuen avatar Sep 26 '16 09:09 wai-chuen

Following a reply on a thread I opened on StackOverflow, I managed to get sbt to work by adding the following resolvers:

resolvers ++= Seq( "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/", "NetBeans" at "http://bits.netbeans.org/nexus/content/groups/netbeans/", "gephi" at "https://raw.github.com/gephi/gephi/mvn-thirdparty-repo/" )

There's still one problem though: I don't have access to all classes of Gephi, even though I added this line to my build file: libraryDependencies += "org.gephi" % "gephi-toolkit" % "0.9.1"

For example, the GraphController class is not present in the org.gephi.graph.api package, even though I have access to org.gephi.graph.api.Node and others. Any idea why?

frobinet avatar Sep 26 '16 19:09 frobinet

I'm having the same problems as well. The above from frobinet solved it.

sbourke avatar Dec 18 '16 18:12 sbourke

About the com.google.common crash in Play, I think latest 0.9.2-snapshot should fix this because we updated our dependencies to guava (we were using google collections, see commit https://github.com/gephi/gephi/commit/0166ac585cebc503489305bbb9f8907b09c9f700).

Can you try, please?

eduramiba avatar Jul 04 '17 20:07 eduramiba

Closing old issue. Netbeans Platform dependencies have been available for a while on Maven central and any version after 0.9.3 should work just fine.

mbastian avatar Mar 17 '23 20:03 mbastian

I am using the toolkit in a clojure project via maven dependencies and still get: Error building classpath. Could not find artifact net.java.dev:stax-utils:jar:snapshot-20100402 in central (https://repo1.maven.org/maven2/).... I tried versions 0.10.0 and 0.10.1 . It works when I use a local toolkit jar, but I'd like to publish the repository sometime...

blnote avatar Apr 06 '23 15:04 blnote

Hi @blnote,

We still have some legacy dependency on our own ad-hoc repository at "https://raw.github.com/gephi/gephi/mvn-thirdparty-repo/". So you would need to add this Maven repository for it to work. In the mid to long term, we don't want any legacy dependencies that aren't on Central but that's not the case right now.

mbastian avatar Apr 06 '23 17:04 mbastian

Thanks, adding the repository worked - also many thanks for Gephi in general!

blnote avatar Apr 06 '23 18:04 blnote

Ah... there is still a problem...when also depending on io-importer-api it can not find the artifact mysql:mysql-connector-java:jar:8.0.31 The internet says it changed its name to mysql-connector-j at some time...any way i could fix this? thanks! https://blogs.oracle.com/mysql/post/mysql-connectorj-has-new-maven-coordinates

blnote avatar Apr 06 '23 18:04 blnote

Hum, thanks I'll take a look. In the meantime as a workaround you could maybe exclude this dependency, or the db-drivers one.

mbastian avatar Apr 06 '23 19:04 mbastian

no problem, i'll just depend the toolkit jar locally for now.

blnote avatar Apr 06 '23 19:04 blnote