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.
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>
Reassigning to default owner.
*** Bug 193771 has been marked as a duplicate of this bug. ***
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.
https://hg.netbeans.org/core-main/rev/2a24101df218 fixes the problem by running Compile on Save executions via maven, not ant