荣格可视化构建失败

jung-visualization build fails

我在编译 jung here. The jung-visualization's PluggableRenderContext.java has a compile error. It appears this problem has come up before as visible by this Google search 的番石榴分支时遇到问题,但 link 重定向到 jung GitHub 存储库。

我已将 GitHub 存储库克隆到我的本地计算机,然后将 Maven 项目导入到 eclipse 中。当 运行 目标 "clean install" 我在构建 jung-visualization 时得到以下输出。


[INFO] ------------------------------------------------------------------------
[INFO] Building jung-visualization 2.0.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ jung-visualization ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jung-visualization ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/eric/Documents/Development/java/git/jung/jung/jung-visualization/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.0:compile (default-compile) @ jung-visualization ---
Compiling 158 source files to /Users/eric/Documents/Development/java/git/jung/jung/jung-visualization/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] jung2 .............................................. SUCCESS [  0.570 s]
[INFO] jung-api ........................................... SUCCESS [  2.159 s]
[INFO] jung-graph-impl .................................... SUCCESS [  2.148 s]
[INFO] jung-algorithms .................................... SUCCESS [  4.028 s]
[INFO] jung-io ............................................ SUCCESS [  3.369 s]
[INFO] jung-visualization ................................. FAILURE [  1.770 s]
[INFO] jung-samples ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.192 s
[INFO] Finished at: 2015-08-16T23:59:57-04:00
[INFO] Final Memory: 62M/369M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0:compile (default-compile) on project jung-visualization: Compilation failure: Compilation failure:
[ERROR] /Users/eric/Documents/Development/java/git/jung/jung/jung-visualization/src/main/java/edu/uci/ics/jung/visualization/PluggableRenderContext.java:[47,7] error: PluggableRenderContext is not abstract and does not override abstract method getEdgeShapeTransformer() in RenderContext
[ERROR] 
[ERROR] could not parse error message:   where V,E are type-variables:
[ERROR] V extends Object declared in class PluggableRenderContext
[ERROR] E extends Object declared in class PluggableRenderContext
[ERROR] /Users/eric/Documents/Development/java/git/jung/jung/jung-visualization/src/main/java/edu/uci/ics/jung/visualization/PluggableRenderContext.java:310: error: getEdgeShapeTransformer() in PluggableRenderContext cannot implement getEdgeShapeTransformer() in RenderContext
[ERROR] public Function<? super Context<Graph<V,E>,E>,Shape> getEdgeShapeTransformer() {
[ERROR] ^
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :jung-visualization

如有任何帮助,我们将不胜感激!最好的问候,MCG。

看来 Guava-fied 的声明中存在错误 RenderContext.java;而不是这个:

Function<Context<Graph<V,E>,E>,Shape> getEdgeShapeTransformer();

应该是这样的:

Function<? super Context<Graph<V,E>,E>,Shape> getEdgeShapeTransformer();

以便签名兼容。