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 - Executing Tests does not inherit properties from pom.xml or the run property
Summary: Executing Tests does not inherit properties from pom.xml or the run property
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 193771 (view as bug list)
Depends on: 215594
Blocks: 187620
  Show dependency tree
 
Reported: 2010-02-09 23:34 UTC by cyrill
Modified: 2013-02-21 12:34 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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