This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 180519

Summary: Executing Tests does not inherit properties from pom.xml or the run property
Product: projects Reporter: cyrill <cyrill>
Component: MavenAssignee: Milos Kleint <mkleint>
Status: RESOLVED FIXED    
Severity: normal CC: rsmogura
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 215594    
Bug Blocks: 187620    

Description cyrill 2010-02-09 23:34:41 UTC
I am developing a command line application which requires certain properties at startup time. I tried to set those properties in the properties dialog of the project in tab "Run". But they are recognised only once. Any subsequent invocation of a test ignores those settings. The same applies for settings of the surefire plugin. They are ignored. I have set a system property (user.timezone) which is not recognised by netbeans but works on the command line (maven invocation).

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <systemPropertyVariables>
                        <user.timezone>GMT</user.timezone>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
Comment 1 Antonin Nebuzelsky 2010-07-30 15:18:13 UTC
Reassigning to default owner.
Comment 2 Jesse Glick 2011-04-27 18:04:43 UTC
*** Bug 193771 has been marked as a duplicate of this bug. ***
Comment 3 Milos Kleint 2012-08-22 07:05:43 UTC
a workaround is to disable Compile on Save for tests or altogether. That's done in the project properties dialog, Compile tab. There's currently no way to set system properties to the ant based CoS execution.
Comment 4 Milos Kleint 2013-02-21 12:34:43 UTC
https://hg.netbeans.org/core-main/rev/2a24101df218 fixes the problem by running Compile on Save executions via maven, not ant