Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Annoyance running Ant build in IntelliJ IDEA

I'm using IntelliJ IDEA v. 12.1.4, Community Edition.

Every time I run an Ant build from the "Ant Build" menu, the IDE opens my build.xml file, stealing focus and covering up whatever I was working on. This is driving me crazy. Other developers in my group don't experience the same behavior.

Is there a setting somewhere to configure/disable this?

Update I noticed that it happens with any command that calls my compile target, and it places focus on the javac line. Here is the task:

<target
        name="compile-source"
        depends="-init">
    <delete dir="${out.source.dir}"/>
    <mkdir dir="${out.source.dir}"/>
    <javac                                   
            destdir="${out.source.dir}"
            includeantruntime="false"
            debug="true">
        <compilerarg value="-Xlint:all"/>
        <src path="${in.source.dir}"/>
        <src path="${in.shared.source.dir}"/>
        <classpath refid="source.compile.classpath"/>
    </javac>
</target>

enter image description hereenter image description hereenter image description hereenter image description here

like image 715
zmb Avatar asked Sep 17 '13 16:09

zmb


1 Answers

Similar issue was reported some time ago in the IntelliJ IDEA Russian community.

It turned out to be a hidden setting in the XML (which has no UI right now but some older EAP build could trigger it because of a bug).

You should check .idea/workspace.xml file in the project root for this:

<component name="antWorkspaceConfiguration">
    <option name="IS_AUTOSCROLL_TO_SOURCE" value="true">

Changing the value to false should fix the problem. Make sure IDEA is not running when you perform this modification.

like image 178
CrazyCoder Avatar answered Sep 18 '22 23:09

CrazyCoder