You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by WujekS <wu...@googlemail.com> on 2010/03/04 16:58:20 UTC

m2eclipse, surefire and systepPropertyVariables

Hi. I have a configuration to set certain properties in the pom file to be
used during my TestNG tests. It doesn't work. Here is what I do:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                    	<property>value</property>
                    </systemPropertyVariables>
                </configuration>
            </plugin>

and in the test file I simply call System.getProperty("property") and it is
null. When called from the command line it works.
How can I make it work in eclipse too?

Regards,
wujek
-- 
View this message in context: http://old.nabble.com/m2eclipse%2C-surefire-and-systepPropertyVariables-tp27782691p27782691.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: m2eclipse, surefire and systepPropertyVariables

Posted by "wujek.srujek" <wu...@gmail.com>.
Hi.
I have just found out what the problem was. It all works on the command
line, it also works when I invoke the maven test phase in eclipse. What
didn't work is when I invoke tests via a TestNG runtime configuration from
eclipse. It is crystal clear why this happens (it has nothing to do with
maven, nor with m2eclipse), I simply must set the properties for the run
configuration.
I apologise for the misunderstanding, I must have had some blackout. I think
that this topic could be moved to trash or deleted, if it is possible,
because it is stupid on my part, and it produces unnecessary noise.

Thank you very much for your interest and time, though.

Regards,
Wujek


David Shapiro-5 wrote:
> 
> Is ECLIPSE_HOME set?
> 
> David
> 
> -----Original Message-----
> From: WujekS [mailto:wujek.srujek@googlemail.com] 
> Sent: Thursday, March 04, 2010 10:58 AM
> To: users@maven.apache.org
> Subject: m2eclipse, surefire and systepPropertyVariables
> 
> 
> Hi. I have a configuration to set certain properties in the pom file to be
> used during my TestNG tests. It doesn't work. Here is what I do:
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <configuration>
>                     <systemPropertyVariables>
>                     	<property>value</property>
>                     </systemPropertyVariables>
>                 </configuration>
>             </plugin>
> 
> and in the test file I simply call System.getProperty("property") and it
> is
> null. When called from the command line it works.
> How can I make it work in eclipse too?
> 
> Regards,
> wujek
> -- 
> View this message in context:
> http://old.nabble.com/m2eclipse%2C-surefire-and-systepPropertyVariables-tp27782691p27782691.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/m2eclipse%2C-surefire-and-systepPropertyVariables-tp27782691p27786334.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: m2eclipse, surefire and systepPropertyVariables

Posted by schrepfler <sc...@gmail.com>.
I think the most coherent behavior would be that m2e sets the launcher system
properties automagically. If a maven project has surefire defined in a
certain way the tests should have those properties declared. For example, I
like to run my tests in UTC always, yet if ran by eclipse they usually
execute with the system timezone which is not ideal.



--
View this message in context: http://maven.40175.n5.nabble.com/m2eclipse-surefire-and-systepPropertyVariables-tp123641p5775918.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: m2eclipse, surefire and systepPropertyVariables

Posted by David Shapiro <Da...@sas.com>.
Is ECLIPSE_HOME set?

David

-----Original Message-----
From: WujekS [mailto:wujek.srujek@googlemail.com] 
Sent: Thursday, March 04, 2010 10:58 AM
To: users@maven.apache.org
Subject: m2eclipse, surefire and systepPropertyVariables


Hi. I have a configuration to set certain properties in the pom file to be
used during my TestNG tests. It doesn't work. Here is what I do:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                    	<property>value</property>
                    </systemPropertyVariables>
                </configuration>
            </plugin>

and in the test file I simply call System.getProperty("property") and it is
null. When called from the command line it works.
How can I make it work in eclipse too?

Regards,
wujek
-- 
View this message in context: http://old.nabble.com/m2eclipse%2C-surefire-and-systepPropertyVariables-tp27782691p27782691.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org