使用Eclipse构建通用Wiki转换器

时间:2014-08-27 08:01:33

标签: java eclipse converter wiki universal

我正在尝试通过Eclipse构建uwc。我将Ant插件安装到Eclipse。我使用的是JRE 1.7和1.6,但在这两种情况下我都没有成功。我收到以下错误。 有没有人使用过这个工具?

Buildfile: C:\Users\****\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\build.xml
    init:
    compile.module.uwc.production:
    [javac2] C:\Users\*****\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\build.xml:156: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac2] Compiling 62 source files to C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\target\uwc\classes
    [javac2] C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\src\com\atlassian\uwc\ui\FeedbackWindow.java:296: error: incompatible types
    [javac2]            method = (State.Type) methodObj;
    [javac2]                     ^
    [javac2]   required: java.awt.Window.Type
    [javac2]   found:    com.atlassian.uwc.ui.State.Type
    [javac2] C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\src\com\atlassian\uwc\ui\FeedbackWindow.java:321: error: incomparable types: java.awt.Window.Type and com.atlassian.uwc.ui.State.Type
    [javac2]        if (method == State.Type.NOTE) { 
    [javac2]                   ^
    [javac2] C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\src\com\atlassian\uwc\ui\FeedbackWindow.java:337: error: incomparable types: java.awt.Window.Type and com.atlassian.uwc.ui.State.Type
    [javac2]        if (method == State.Type.STEP) {
    [javac2]                   ^
    [javac2] C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\src\com\atlassian\uwc\ui\FeedbackWindow.java:341: error: incomparable types: java.awt.Window.Type and com.atlassian.uwc.ui.State.Type
    [javac2]        else if (method == State.Type.MAX) {
    [javac2]                        ^
    [javac2] Note: Some input files use or override a deprecated API.
    [javac2] Note: Recompile with -Xlint:deprecation for details.
    [javac2] Note: Some input files use unchecked or unsafe operations.
    [javac2] Note: Recompile with -Xlint:unchecked for details.
    [javac2] 4 errors

    BUILD FAILED
    C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\build.xml:156: Compile failed; see the compiler error output for details.

    Total time: 2 seconds

感谢您寻找

1 个答案:

答案 0 :(得分:1)

我们在Linux机器上通过cmdline构建它时遇到了完全相同的错误 - 因此它与Eclipse无关。

我们通过修改src / com / atlassian / uwc / ui / FeedbackWindow.java,更改了几种类型和/或类型转换来解决它 - 至少对我们来说。

以下注释掉的行是原始行:

//import com.atlassian.uwc.ui.State.Type;
import com.atlassian.uwc.ui.State;
...

public void update(Observable stateObs, Object methodObj) {
    State state;
    //Type method;
    State.Type method;
    CastProblem problem = CastProblem.NOT_STATE;
    try {
        state = (State) stateObs;
        problem = CastProblem.NOT_TYPE; //state cast didn't fail; let's try methodObj. Used by ClassCastException catch block
        //method = (Type) methodObj;
        method = (State.Type) methodObj;
    } catch (ClassCastException e) {
...

//private void updateFeedbackTextArea(State state, Type method) {
private void updateFeedbackTextArea(State state, State.Type method) {
    //if ((State.Type) method == State.Type.NOTE) {
    if (method == State.Type.NOTE) {
...

//private synchronized void updateProgressBar(State state, Type method) {
private synchronized void updateProgressBar(State state, State.Type method) {
...