4

我想运行一个项目 build.xml 的“ant build-project”。

    <javac deprecation="true"
           includeantruntime="false"
           debug="true"
           debuglevel="${debuglevel}"
           destdir="${project.build.outputpath}"
           verbose="true"
           encoding="UTF-8">
        <src path="${project.src.classes}" />
        <compilerarg value="-Xlint" />
        <classpath refid="core.classpath" />
    </javac>

<path id="core.classpath">          
   <pathelement location="${project.build.outputpath}" />       
      <pathelement location="${test.dir}" />
              <fileset dir="${project.build.libpath}">
                <include name="**/*.jar"/>
              </fileset>        
</path>

project.build.outputpath:/PROJECT_MAIN_DIR/target/classes project.build.libpath:/PROJECT_MAIN_DIR/target/lib

但是这个输出让我抓狂:

build.xml:77:编译失败;有关详细信息,请参阅编译器错误输出。在 org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:999) 在 org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:820) 在 org.apache.tools.ant .UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method .java:601) 在 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) 在 org.apache.tools.ant.Task.perform(Task.java:348) 在 org.apache。 tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java: 1329)在组织。

我的配置:

Ant: Apache Ant 1.7.0 版

Java: java版本“1.6.0_24”OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-1ubuntu0.12.04.1) OpenJDK 64-Bit Server VM(build 20.0-b12,混合模式)

PC Ubuntu 12.04

XXX.java:248: warning: [rawtypes] found raw type: Class
    [javac]     private static void logNotFoundInMemory(Class entityClass, Integer id)
    [javac]                                             ^
    [javac]   missing type arguments for generic class Class<T>
    [javac]   where T is a type-variable:
    [javac]     T extends Object declared in class Class


StatReporterJob.java:219: warning: [unchecked] unchecked cast
    [javac]             T stat = (T) snapshotRow[REFERENCE];
    [javac]                                     ^
    [javac]   required: T
    [javac]   found:    Object

你会帮忙吗?

4

0 回答 0