使用javacc编译存在一些条件无法编译的情况,例如org.codehaus.jackson.annotate.JsonIgnore的注解@JsonIgnore
这个时候可以使用eclipse的编译器jdt进行编译,以下方法:
<!--在ant中添加property,使用eclipse jdt compiler编译-->
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
使用jdt的时候需要注意的是,javac必须指定版本否则无法编译
<!-- 如果指定了build.compiler使用eclipse jdt编译就必须指定版本-->
<javac
nowarn="on"
source="1.6"
target="1.6"
deprecation="true"
debug="true" encoding="UTF-8"
srcdir="${base.src.dir}"
destdir="${classes.dir}"
classpathref="lib.class.path" >
</javac>
把eclipse的jdt三个jar包放到ant\lib下面去:
org.eclipse.jdt.compiler.tool_1.0.100.v_894_R34x.jar
org.eclipse.jdt.core_3.4.4.v_894_R34x.jar
org.eclipse.jdt.debug.ui_3.3.1.v20080730_r341.jar
----------------------------------------------------------------------------------
Class not found: org.eclipse.jdt.core.JDTCompilerAdapter 错误处理:
ant调用eclipse的jdt出现这个错误,检查类名书写是否正确,是否有空格。
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
分享到:
相关推荐
ant 编译用 jdt_jars
java开发常用 jdt-compiler-3.1.1.jar
适合在ant下进行编译的工具,以及一些checkstyle,方便实用
jasper-compiler-jdt-5.5.15.jar 有效解決打印出現的異常org/eclipse/jdt/internal/compiler/ICompilerRequestor
包括以下包:jdt-3.2.1-r321_v20060823.jar、 jdt-3.3.0-v20070607-1300.jar、jdt-3.4.2_r894.jar、jdt-compiler.jar、org.eclipse.datatools.enablement.jdt.classpath_1.0.1.v201107221501.jar、org.eclipse.jdt....
Itext中文显示,基于iTextAsian.jar ,另外在ireport中也需要用到这个jar包。以及ireport编译以及字体的相关设置均需用到这些jar包。希望能帮到你。
进度条,实现对动画加载的计算,并计算出时间,同步动画播放
拷贝下面这些jar包到ant_home/lib org.eclipse.jdt.compiler.tool_1.1.0.v20150513-2007 org.eclipse.jdt.core_3.11.0.v20150602-1242 org.eclipse.jdt.debug.ui_3.7.0.v20150505-1916 jdtCompilerAdapter.jar
eclipse JDT的使用,非常使用的学习资源!!!
JDT原代码、工具根据IMB官网 和下载我的源代码进行操作
用eclipse运行ant脚本报错: ...org.eclipse.jdt.compiler.tool_1.0.100.v_972_R35x.jar org.eclipse.jdt.core_3.5.2.v_981_R35x.jar org.eclipse.jdt.debug.ui_3.4.1.v20090811_r351.jar jdtCompilerAdapter.jar
Eclipse ASTView需要的jar包,基本上已经全了,一共12个
eclipse.jdt.core, jdt/核心项目库( eclipse jdt core ) JDT... 它包含对编译和使用Java代码的非用户界面支持,包括:可以独立运行或者作为 Eclipse IDE的一部分的增量或者批处理Java编译器Java源文件和类文件索引器和
ant.jar wsdl4j-1.5.1.jar jaxrpc.jar jasper-jdt.jar
ant-apache-log4j.jar ant-commons-logging.jar ant.jar [以上3个包,没有的话下载ant,在ant的lib里面都有 http://ant.apache.org/bindownload.cgi] javax.wsdl_1.6.2.v201012040545.jar jaxrpc.jar org...
Eclipse-plugins 插件,eclipse 各种插件 .jar 包,免费下载 eclipse202106 -plugins 各种插件 .jar 包,免费下载 如果下载不了,关注我,评论区联系我, Eclipse-plugins eclipse, plugins, eclipse202106, ...
Eclipse-plugins 插件,eclipse 各种插件 .jar 包,免费下载 eclipse202106 -plugins 各种插件 .jar 包,免费下载 如果下载不了,关注我,评论区联系我, Eclipse-plugins eclipse, plugins, eclipse202106, ...
tomcat 源码 ant 下载时用到的eclipse-JDT-3.3.1.zip