jung-visualization build失败

时间:2015-08-17 04:29:57

标签: jung jung2

我正在编写jung发现的番石榴分支here。 jung-visualization的PluggableRenderContext.java有一个编译错误。看来这个问题在this Google search可见之前出现了,但链接重定向到jung GitHub存储库。

我已经将GitHub存储库克隆到我的本地机器,然后将一个Maven项目导入到eclipse中。当运行目标“干净安装”时,我在构建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。

1 个答案:

答案 0 :(得分:0)

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

#include <stdio.h>
#define COUNT 9

   /* this buffer is global. intentionally.
   ** It occupies (part of) one cache slot,
   ** and any reference to it is a constant
   */
char ten[COUNT+1] ;

unsigned rec(unsigned pos, unsigned mask);
int main(void)
{
unsigned res;

ten[COUNT] = 0;

res = rec(0, (1u << COUNT)-1);
fprintf(stderr, "Res=%u\n", res);

return 0;
}

/* recursive function: consume the mask of available numbers
** until none is left.
** return value is the number of generated permutations.
*/
unsigned rec(unsigned pos, unsigned mask)
{
unsigned bit, res = 0;

if (!mask) { puts(ten); return 1; }

for (bit=0; bit < COUNT; bit++) {
        if (! (mask & (1u <<bit)) ) continue;
        ten[pos] = '1' + bit;
        res += rec(pos+1, mask & ~(1u <<bit));
        }
return res;
}

它应该是这样的:

    <?php
    if($_POST["ddList1"] > 0){ ?>
    <table>
        <tr>
            <td><?php echo $_POST["ddList1"]; ?></td>
            <td><?php echo $_POST["ddList1name"]; ?></td>
            <td><?php echo $_POST["ddList1desc"]; ?></td>
            <td>
                <?php
                    switch ($_POST["ddList1"]) {
                        case "1":
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        break;
                        case "2":
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        break;
                        case "3":
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>";

                        break;
                        case "4":
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>";
                        break;
                        case "5":
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>&nbsp;";
                        echo "<button type=\"button\" class=\"btn btn-info ButtonOne1\" onclick=\"openwindow1();\" aria-label=\"Left Align\"><span class=\"glyphicon glyphicon glyphicon-list-alt\" aria-hidden=\"true\"></span></button>";
                        break;  
                        default:
                        echo "out of range";
                    }
                ?>
            </td>
        </tr>
    </table>
<?php } ?>

以便签名兼容。