ant module build file

Idea 7.0.1

In Idea6 Ant build file for modules contained definitions like this:
Idea7 on Windows generates build file: ]]>

It's not a problem when Ant build is executed on Windows. But when I
execute build on Linux, I have to define property "core.output.dir",
"core.testoutput.dir", and similar properties for other modules.
Even worse, when I copy the project to some other directory on Windows,
then Ant build output will go to original location.

Could, JetBrains, modify in Idea7 "Generate Ant build...", so it doesn't
generate Ant .xml files, which are OS/location specific?

TomP

4 comments

Hello TomP,

I have just tried the same on simple new project with 2 modules. For me IDEA
generates ${module.name.basedir} references, so all is Ok...

Idea 7.0.1

In Idea6 Ant build file for modules contained definitions like this:
<property name="core.output.dir"
value="${module.core.basedir}/../classes/production/Core"/>
Idea7 on Windows generates build file:
<property name="core.output.dir"
value="C:/projects.svn.i7/PORetrieve/out/production/Core"/>
It's not a problem when Ant build is executed on Windows. But when I
execute build on Linux, I have to define property "core.output.dir",
"core.testoutput.dir", and similar properties for other modules.
Even worse, when I copy the project to some other directory on
Windows,
then Ant build output will go to original location.
Could, JetBrains, modify in Idea7 "Generate Ant build...", so it
doesn't generate Ant .xml files, which are OS/location specific?

TomP

Alexander.


0

Alexander,

Thanks for looking into this.
I also created small test project with two modules. Everything was fine.
Than I went back to my original project and regenerated Ant build files.
This project has 6 modules. Two of the Ant build files contain absolute
paths. Remaining four are OK.
What could be causing that?

TomP

0

Alexander,

I figure it out.
This happens when you set in your module settings:
'References to resources outside module file directory' as 'Absolute'.
Should this setting make module.output.dir to be absolute? It is not
very intuitive.

TomP

0

Hello TomP,

I think it's quite logical. Making references outside module directory absolute
means, particularly, that user do not want to share this module with different
file system (because absolute paths will not work on different computer).
And build file generator works accordingly.

If one wants a module to be used in different locations, the setting should
be set to "Relative".

Alexander,

I figure it out.
This happens when you set in your module settings:
'References to resources outside module file directory' as 'Absolute'.
Should this setting make module.output.dir to be absolute? It is not
very intuitive.
TomP

Alexander.


0

Please sign in to leave a comment.