Built in ant doesn't read properties external file

In my build file I have the following:

]]>


in my properties file. I have both core.module and mod1.module defined. Yet they both appear red in the ant build file. I have confirmed the paths as correct in a shell. I am using the bundled 1.6.5 ant in IDEA 5.0. Am I missing something? Thanks

0

You're not missing anything. This is a known regression from 4.5. See Jira bug and add your vote!

Regression from 4.5.x : Ant build.xml doesn't resolve properties set in an included property file.
http://www.jetbrains.net/jira/browse/IDEA-4234

0

Could you please post the complete set of files into www.jetbrains.net/jira
?

--
regards,
--
Alexey Kudravtsev
Software Developer
JetBrains, Inc, http://www.jetbrains.com
"Develop with pleasure!"

"Vincent Storm" <no_mail@jetbrains.com> wrote in message
news:31607816.1124235033624.JavaMail.itn@is.intellij.net...

In my build file I have the following:

>

<property file="absolute/path/build.properties"/>

>

<property name="core.dir" value="${core.module}"/>
<property name="mod1.dir" value="${mod1.module}"/>

>
>

in my properties file. I have both core.module and mod1.module defined.
Yet they both appear red in the ant build file. I have confirmed the paths
as correct in a shell. I am using the bundled 1.6.5 ant in IDEA 5.0. Am I
missing something? Thanks



0

I'm confused now, I have a properties file which won't load and therefore the build.xml is invalid, and I have a separate properties file which won't load and therefore the build.xml is valid, yet it deliberately refers to invalid property definitions. I am trying to figure out what the difference between these is now.

0

Ok, here you go. I figured out that at some point IDEA decides to start treating the build.xml as an Ant file. Once it does that, the properties loaded from a .properties file are ignored. I think the trick was setting build.xml to the project's build file and then switching out of the IDEA window and back, but I'm not sure.

I've included the entire project, but the key elements are 2 or 3 lines in build.xml and local.properties.

--James



Attachment(s):
Bug #4234.zip
0

Had the same problem. This is what helped:
IDE Settings -> File Types
"properties" file extension should be registered under Properties Files and not under Text Files as it originally appeared after upgrade from 4.5 version.
Fixing this mapping also resolved few other issues

0

That works! Thanks, glad it is so simple.

That should also mean the bug is very simple to fix too. ;)

james

0

请先登录再写评论。