I have a problem with IDEA on Mac OS/X which I never encountered on
Windows machines.

I have ant files that use <![CDATA[]]> and later in
the script those environment variables are used with \${env.SOMETHING}
which works as expected on the command line. In IDEA however the same
build file fails with errors because paths are not found (and from the
output I suppose the environment variables are either not found or not
expanded).

Any suggestions?

Michael

In article <c2fs6v\$bmr\$1@is.intellij.net>,
Michael Descher <michael.descher@gmx.de> wrote:

I have ant files that use <property environment="env" /> and later in
the script those environment variables are used with \${env.SOMETHING}
which works as expected on the command line. In IDEA however the same
build file fails with errors because paths are not found (and from the
output I suppose the environment variables are either not found or not
expanded).

Are you setting those environment variables from IDEA's Ant tool window?
That's always worked fine for me on Mac OS X.

--
Erik Hanson

No they are plain environment variables which are set in my users ".profile". Maybe the IDEA process does not see them since - as mentioned - it works when calling ant from a shell.

I am seeing this also. When I do the following:

<exec dir="\$" executable="cmd.exe" output="\$/wsdl2javaoutput.txt">
<![CDATA[ ]]>

I get the following output:

C:\IntelliJ-IDEA-4.0\lib\idea.jar;C:\IntelliJ-IDEA-4.0\lib\jdom.jar;C:\IntelliJ-IDEA-4.0\lib\log4j.jar;C:\IntelliJ-IDEA-4.0\bin\lax.jar;

which is clearly not the value for the environment variable 'classpath' that I wanted (I wanted the one that I had set in the Windows environment variables dialog, not the one that IntelliJ uses for compilation.)

This seems to me to be a pretty serious bug in IntelliJ. It's overwriting the global classpath environment variable when run, which apparently gets passed down to subprocesses (like ANT).

As is evidenced in this thread, this seems to occur both on UNIX and Windows.

To solve the problem you have to start Idea with bat file not idea.exe - the launcher overrides CLASSPATH environment variable.

I think the same will work for MAC.