Intellij changes url of Ant build file to non existing file outside of project

Answered

I don't know why, but Intellij changed the url to the Ant build file in .idea/ant.xml

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/../../build.xml">
<maximumHeapSize value="1024" />
<executeOn event="beforeCompilation" target="build-dependencies" />
</buildFile>
</component>
</project>

I realized the modification in the VCS. The old url was

file://$PROJECT_DIR$/build.xml

which is correct (build.xml is in the root directory of my project).

The file

$PROJECT_DIR$/../../build.xml

is outside of my project and does not exist on my system. I can reset the change to build.xml, but Intellij changes the url again on startup.

0
4 comments

Hi, is the problem reproducible? Could you please provide a project example?

0

The problem occurs with this project. I was able to reproduce the problem (on my system) by doing:

  1. git clone https://github.com/sosy-lab/cpachecker.git
  2. idea cpachecker
  3. "Run Ant Target 'build'"
  4. git diff .idea/ant.xml
diff --git a/.idea/ant.xml b/.idea/ant.xml
index 00e406d..c8f8499 100644
--- a/.idea/ant.xml
+++ b/.idea/ant.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="AntConfiguration">
-    <buildFile url="file://$PROJECT_DIR$/build.xml">
+    <buildFile url="file://$PROJECT_DIR$/../../build.xml">
       <maximumHeapSize value="1024" />
       <executeOn event="beforeCompilation" target="build-dependencies" />
     </buildFile>
0

Even though I could reproduce the problem on my system using another project directory (fresh clone of repository), I wasn't able to reproduce it on another system I setup in a VM. Both systems run Intellij IDEA build #IU-181.4203.550 using OpenJDK 1.8.0_152-release-1136-b20 on Linux Mint 18.

0

Does the problem reproduces if you remove .idea folder and reimport project?

0

Please sign in to leave a comment.