我想运行“ant build-project”项目build.xml。
<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 /目标/类 project.build.libpath:/ PROJECT_MAIN_DIR /目标/ lib中
但这个输出让我发疯:
build.xml:77:编译失败;请参阅编译器错误输出 细节。在 org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:999)at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:820)at at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) 在sun.reflect.GeneratedMethodAccessor2.invoke(未知来源)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:601)at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) 在org.apache.tools.ant.Task.perform(Task.java:348)at org.apache.tools.ant.Target.execute(Target.java:357)at org.apache.tools.ant.Target.performTasks(Target.java:385)at at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) 在org.apache.tools.ant.Project.executeTarget(Project.java:1298)at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) 在org.apache.tools.ant.Project.executeTargets(Project.java:1181)at org.apache.tools.ant.Main.runBuild(Main.java:698)at org.apache.tools.ant.Main.startAnt(Main.java:199)at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)at at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
我的配置:
Ant: Apache Ant版本1.7.0
Java: java版“1.6.0_24”OpenJDK运行时环境(IcedTea6 1.11.4)(6b24-1.11.4-1ubuntu0.12.04.1)OpenJDK 64位服务器VM(内置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
你会帮忙吗?