InteliiJ 社区版上的 Ant 构建未显示编译器错误 [英] Ant build on InteliiJ Community Edition no compiler errors shown

查看:14
本文介绍了InteliiJ 社区版上的 Ant 构建未显示编译器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有项目,我想在 Ubuntu 12.04.1 LTS 上运行的 IntelliJ 社区版 11.1.4 中构建该项目

I have an existing project that I want to build in the IntelliJ Community Edition 11.1.4 running on Ubuntu 12.04.1 LTS

在 Ant Build 窗口中,我通过单击窗口左上角的 + 按钮并导航到该文件来添加项目的 build.xml.列出了与构建文件关联的 ant 任务,我单击绿色播放按钮以运行按预期开始的 ant 构建.

In the Ant Build window I added the project's build.xml by clicking on the + button in the top left hand corner of the window and navigating to the file. The ant tasks associated with the build file are listed and I click on the green play button to run the ant build which commences as expected.

我期待看到编译器错误,并让 IntelliJ CE 显示这些编译器错误,并允许我在双击消息"窗口中的错误后跳转到(有问题的)源.

I was expecting to see compiler errors and have IntelliJ CE present those compiler errors and allow me to Jump to (the offending) Source having double clicked on the errors in the Messages window.

相反,消息窗口显示以下错误,当我双击它时,它会将我带到 build.xml 文件中的 javac ant 任务.

Instead, the messages window displays the following error which when I double-click on it takes me to the javac ant task in the build.xml file.

build.xml:389: Compile failed; see the compiler error output for details.

这是一个很好的建议,我非常想遵循它,但我不能,因为编译器错误未显示在消息窗口中的任何位置.下一条和上一条消息不会导航到实际的编译器错误.

This is great advice and I very much want to follow it but I cannot because the compiler error is not displayed anywhere in the Messages window. Next and Previous Message do not navigate to an actual compiler error.

我想知道如何在运行 Ant 构建的 IntelliJ 中查看编译器错误消息.

I want to know how to be able to see the compiler error messages in IntelliJ having run an Ant build.

我尝试将 -v 标志添加到 Ant 命令行:执行属性中的字段.这对行为没有影响.

I tried adding the -v flag to the Ant command line:field in Execution Properties. This made no difference to the behaviour.

然后我尝试从 Ant 1.8 降级到 Ant 1.7.这次我确实看到了行为上的变化.构建根本没有运行,我收到以下错误 https://gist.github.com/4073149 在终端.

I then tried down grading from Ant 1.8 to Ant 1.7. this time I did see a change in behaviour. the build does not run at all and I get the following error https://gist.github.com/4073149 at the terminal.

javac ant 任务如下所示.

The javac ant task looks like this.

<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"/>

推荐答案

IDEA 只是打印 Ant 的输出.尝试使用消息面板左侧的相应按钮将输出从树视图切换到纯文本视图:

IDEA just prints Ant's output. Try switching the output from the tree view to the plain text view using the corresponding button on the left of the messages panel:

如果输出包含错误,您应该能够在那里看到它们.

If the output contains errors, you should be able to see them there.

此外,使用 IDEA 提供的增量编译 (Build | Make) 更快、更容易.

Also it's much faster and easier to use IDEA provided incremental compilation (Build | Make).

这篇关于InteliiJ 社区版上的 Ant 构建未显示编译器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆