【发布时间】:2012-11-14 16:40:54
【问题描述】:
我有一个想要在 IntelliJ Community Edition 11.1.4 中构建的现有项目,该版本在 Ubuntu 12.04.1 LTS 上运行
在 Ant Build 窗口中,我通过单击窗口左上角的 + 按钮并导航到文件来添加项目的 build.xml。列出了与构建文件关联的 ant 任务,我单击绿色播放按钮运行 ant 构建,它按预期开始。
我希望看到编译器错误并让 IntelliJ CE 显示这些编译器错误,并允许我在“消息”窗口中双击错误后跳转到(有问题的)源。
相反,消息窗口显示以下错误,当我双击它时,它会将我带到build.xml 文件中的javac ant 任务。
build.xml:389: Compile failed; see the compiler error output for details.
这是一个很好的建议,我非常想遵循它,但我不能,因为编译器错误不会显示在 Messages 窗口的任何地方。 Next 和 Previous Message 不会导航到实际的编译器错误。
我想知道如何在运行 Ant 构建的 IntelliJ 中查看编译器错误消息。
我尝试将 -v 标志添加到 Ant 命令行:执行属性中的字段。这对行为没有影响。
然后我尝试从 Ant 1.8 降级到 Ant 1.7。这次我确实看到了行为的变化。构建根本没有运行,我在终端收到以下错误https://gist.github.com/4073149。
javac ant 任务如下所示。
<target name="compile-only" depends="">
<stopwatch name="Compilation"/>
<javac destdir="${build.classes.dir}" debug="on" deprecation="off"
classpathref="base.path" excludes="/filtering/**/**">
<src path="${src.dir}"/>
<src path="${build.autogen.dir}"/>
</javac>
<!-- Copy all resource files to the output dir -->
<copy todir="${build.classes.dir}">
<fileset dir="${src.dir}">
<include name="**/*.properties"/>
<include name="**/*.gif"/>
<include name="**/*.png"/>
<include name="**/*.jpg"/>
<include name="**/*.svg"/>
<include name="**/*.jpeg"/>
<exclude name="**/.svn"/>
</fileset>
</copy>
<stopwatch name="Compilation" action="total"/>
【问题讨论】:
标签: ant intellij-idea