sbt构建后gephi-toolkit中缺少类 [英] Missing classes in gephi-toolkit after sbt build

查看:154
本文介绍了sbt构建后gephi-toolkit中缺少类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Play应用程序项目中使用Gephi-toolkit,并且在构建项目时遇到问题.起初,由于某些未解决的依赖关系,我无法构建项目.作为在此处输入链接描述的答复,建议,我的build.sbt现在看起来像这样:

I'm trying to use Gephi-toolkit in a Play Application project and facing issues with building the project. At first I couldn't build the project because of some unresolved dependencies. As an answer from enter link description here suggested, my build.sbt now looks like this:

name := """project-name"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.8"

routesGenerator := InjectedRoutesGenerator

resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"

libraryDependencies ++= Seq(
  "com.typesafe.play" %% "play-slick" % "2.0.0",
  "com.typesafe.play" %% "play-slick-evolutions" % "2.0.0",
  "org.scalatestplus.play" %% "scalatestplus-play" % "1.5.0" % "test",
  "com.h2database" % "h2" % "1.4.187",
  "org.gephi" % "gephi-toolkit" % "0.9.1",
  specs2 % Test
)

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

fork in run := false

现在似乎可以正确解决依赖关系,这是sbt解决与Gephi相关的部分时显示的内容:

The dependencies now seem to be resolved correctly, and this is what gets printed when sbt resolves the parts related to Gephi:

[info] Updating {file:/Users/fro/Desktop/ucl-social-network/}root...
[info] Resolving org.apache.xmlgraphics#batik-svg-dom;1.7 ...
[warn] circular dependency found: org.apache.xmlgraphics#batik-anim;1.7->org.apache.xmlgraphics#batik-svg-dom;1.7->...
[warn] circular dependency found: org.apache.xmlgraphics#batik-svg-dom;1.7->org.apache.xmlgraphics#batik-anim;1.7->...
[info] Resolving org.apache.xmlgraphics#batik-gvt;1.7 ...
[warn] circular dependency found: org.apache.xmlgraphics#batik-bridge;1.7->org.apache.xmlgraphics#batik-gvt;1.7->...
[warn] circular dependency found: org.apache.xmlgraphics#batik-gvt;1.7->org.apache.xmlgraphics#batik-bridge;1.7->...
[info] Resolving org.apache.xmlgraphics#batik-script;1.7 ...
[warn] circular dependency found: org.apache.xmlgraphics#batik-bridge;1.7->org.apache.xmlgraphics#batik-script;1.7->...
[warn] circular dependency found: org.apache.xmlgraphics#batik-bridge;1.7->org.apache.xmlgraphics#batik-script;1.7->...
[warn] circular dependency found: org.apache.xmlgraphics#batik-script;1.7->org.apache.xmlgraphics#batik-bridge;1.7->...
[info] Resolving org.gephi#gephi-parent;0.9.1 ...
[warn] circular dependency found: org.apache.xmlgraphics#batik-bridge;1.7->org.apache.xmlgraphics#batik-gvt;1.7->...
[info] Resolving jline#jline;2.12.1 ...
[info] downloading https://repo1.maven.org/maven2/org/gephi/gephi-toolkit/0.9.1/gephi-toolkit-0.9.1.jar ...
[info]  [SUCCESSFUL ] org.gephi#gephi-toolkit;0.9.1!gephi-toolkit.jar (376ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/utils-longtask/0.9.1/utils-longtask-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#utils-longtask;0.9.1!utils-longtask.nbm (135ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/project-api/0.9.1/project-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#project-api;0.9.1!project-api.nbm (911ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/io-exporter-api/0.9.1/io-exporter-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#io-exporter-api;0.9.1!io-exporter-api.nbm (116ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/graph-api/0.9.1/graph-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#graph-api;0.9.1!graph-api.nbm (116964ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/preview-api/0.9.1/preview-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#preview-api;0.9.1!preview-api.nbm (457ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/io-exporter-preview/0.9.1/io-exporter-preview-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#io-exporter-preview;0.9.1!io-exporter-preview.nbm (107ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/utils/0.9.1/utils-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#utils;0.9.1!utils.nbm (138ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/datalab-api/0.9.1/datalab-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#datalab-api;0.9.1!datalab-api.nbm (189ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/visualization-api/0.9.1/visualization-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#visualization-api;0.9.1!visualization-api.nbm (119ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/preview-plugin/0.9.1/preview-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#preview-plugin;0.9.1!preview-plugin.nbm (177ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/db-drivers/0.9.1/db-drivers-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#db-drivers;0.9.1!db-drivers.nbm (16421ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/io-importer-api/0.9.1/io-importer-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#io-importer-api;0.9.1!io-importer-api.nbm (231ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/io-processor-plugin/0.9.1/io-processor-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#io-processor-plugin;0.9.1!io-processor-plugin.nbm (121ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/appearance-api/0.9.1/appearance-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#appearance-api;0.9.1!appearance-api.nbm (154ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/statistics-api/0.9.1/statistics-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#statistics-api;0.9.1!statistics-api.nbm (116ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/statistics-plugin/0.9.1/statistics-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#statistics-plugin;0.9.1!statistics-plugin.nbm (288ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/algorithms-plugin/0.9.1/algorithms-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#algorithms-plugin;0.9.1!algorithms-plugin.nbm (102ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/mostrecentfiles-api/0.9.1/mostrecentfiles-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#mostrecentfiles-api;0.9.1!mostrecentfiles-api.nbm (103ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/layout-api/0.9.1/layout-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#layout-api;0.9.1!layout-api.nbm (115ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/io-generator-api/0.9.1/io-generator-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#io-generator-api;0.9.1!io-generator-api.nbm (94ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/io-generator-plugin/0.9.1/io-generator-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#io-generator-plugin;0.9.1!io-generator-plugin.nbm (102ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/io-exporter-plugin/0.9.1/io-exporter-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#io-exporter-plugin;0.9.1!io-exporter-plugin.nbm (183ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/filters-api/0.9.1/filters-api-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#filters-api;0.9.1!filters-api.nbm (117ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/ui-propertyeditor/0.9.1/ui-propertyeditor-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#ui-propertyeditor;0.9.1!ui-propertyeditor.nbm (105ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/layout-plugin/0.9.1/layout-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#layout-plugin;0.9.1!layout-plugin.nbm (312ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/io-importer-plugin/0.9.1/io-importer-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#io-importer-plugin;0.9.1!io-importer-plugin.nbm (284ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/filters-plugin/0.9.1/filters-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#filters-plugin;0.9.1!filters-plugin.nbm (264ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/filters-impl/0.9.1/filters-impl-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#filters-impl;0.9.1!filters-impl.nbm (154ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/appearance-plugin/0.9.1/appearance-plugin-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#appearance-plugin;0.9.1!appearance-plugin.nbm (126ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/core-library-wrapper/0.9.1/core-library-wrapper-0.9.1.nbm ...
[info]  [SUCCESSFUL ] org.gephi#core-library-wrapper;0.9.1!core-library-wrapper.nbm (29982ms)
[info] downloading https://repo1.maven.org/maven2/org/gephi/graphstore/0.5.3/graphstore-0.5.3.jar ...
[info]  [SUCCESSFUL ] org.gephi#graphstore;0.5.3!graphstore.jar (685ms)
[info] Done updating.

我的问题是,即使在Gephi的API中记录了某些Gephi类,仍然仍然无法访问.一个示例是org.gephi.graph.api.GraphController类(请参见此链接).由于我绝对没有看到错误,因此可以很好地访问其他一些类(例如org.gephi.graph.api.Node).知道是什么问题吗?

My problem is that some of Gephi classes are still inaccessible, even though they are documented in Gephi's API. One example is the org.gephi.graph.api.GraphController class (see this link). Since I see absolutely no error, and some other classes are perfectly accessible (e.g. org.gephi.graph.api.Node). Any idea what the problem is?

推荐答案

在gradle项目中,gephi-toolkit也有类似的问题.问题的根源是nbm格式的传递依存关系.作为解决方案,您可以将gephi-toolkit与来自Maven中央存储库的分类器"all"一起使用:

I have a similar problem with gephi-toolkit in a gradle project. Transitive dependencies in the nbm format is the root of the problem. As a solution you can use gephi-toolkit with classifier 'all' from the maven central repository:

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

还需要额外的存储库:

resolvers += "NetBeans" at "http://bits.netbeans.org/nexus/content/groups/netbeans/"
resolvers += "gephi" at "https://raw.github.com/gephi/gephi/mvn-thirdparty-repo/"

这篇关于sbt构建后gephi-toolkit中缺少类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆