Iletij doesn't trigger systemPropertiesFile of maven-surefire

Hi guys,

I'm evaluatin intelij idea 12.1.4 since 2 two weeks. First of all it's a great idea. The best that I used for Java and JavaEE stuff I can say.

I use project sepecific settings for setup my testenvironment. Some of the properties are defined in my pom and some of then in an external propertyfile.

Iletij sets the -D options for systemPropertyVariables. But doesn't trigger my proprty file which is definded under systemPropertiesFile.

Under the commandline works this approach perfectly. Did I miss something??














                    <argLine>-Xms256m -Xmx512m -XX:MaxPermSize=128m -ea





















Comment actions Permalink


What action works wrong for you? Starting a Maven goal from Maven Projects tool window?


Comment actions Permalink

Hi Alexander,

over maven works everything ok. The problem occurs if I run junit tests over runconfiguration. Intilij set properties of the section    <systemPropertyVariables>    </systemPropertyVariables> fine but ignores the properties of <systemPropertiesFile>${user.home}\</systemPropertiesFile>. So I must set it with VM options in the runconfiguration at the moment.

Comment actions Permalink

If I've got it correctly, properties specified in file are to be passed to JUnit runner, and this is done by Maven surefire plugin.

This way, if we want to run JUnit independently from Maven, we have to:
1. Find a way to pass system properties file to JUnit. This does not depend on IDEA.
2. Provide a feature in IDEA to correctly pick up the file name from the surefire configuration and pass it to JUnit (well, somehow).

I have stopped at point 1. Brief googling does not tell me does JUnit accept a _system_ properties _file_. Do you know?

Anyway, if I understand this correctly, there is no required IDEA feature at the moment.

Thank you,

Comment actions Permalink

Hi Alexander,

if I run mvn from console then my properties will set correctly over surefire.

Comment actions Permalink

Has anyone done anything with this?  It's pretty ridiculous that it's sat around for 3 years with only "there's not required IDEA feature at the moment".

I have a whole organisation ready to switch to NetBeans over this issue.


Please sign in to leave a comment.