You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stefano Fornari <st...@gmail.com> on 2009/03/18 23:48:26 UTC

different behaviour of surefire with maven 2.0.10

Hi All,
Has anyone experiencing the same problem? Up to maven 2.0.9 I was used
to test the project with a command line similar to:

mvn -D__TEST__=true test

The test code uses System.getProperty("__TEST__") and gets the value
passed on the command line. With maven 2.0.10 this doe snot happen, so
the tests do not pass because of the missing property. Is this the
intended behaviour? Or is it a bug? I am attaching a test project if
anyone is kind to spend some time to try it out.

Thanks in advance.


-- 
Ste

Re: different behaviour of surefire with maven 2.0.10

Posted by Stefano Fornari <st...@gmail.com>.
I do not know... it is weird, but I believe at the end I discovered
that it depends by when tests are done in a forked JVM. If you fork,
than you have to do the option to specify additional command line
parameters. If you do not fork, the defines are indeed available to
the tests.
I am sure the same exact thing worked before 2.0.10, and with 2.1 but
not with 2.0.10. Maybe the default fork option is different.

HTH
Ste

On Sun, Mar 22, 2009 at 7:20 PM, Dan Tran <da...@gmail.com> wrote:
> ummm, 2.0.10 as I understand, introduces this problem because it uses
> surefire 2.4.3,
>
> Now you claim its fixed the issue, could you elaborate on that?
>
> Thanks
>
> -D
>
> On Sun, Mar 22, 2009 at 8:39 AM, Stefano Fornari
> <st...@gmail.com> wrote:
>> BTW, maven 2.1.0 fixes the problem!
>>
>> Ste
>>
>> On Thu, Mar 19, 2009 at 8:29 PM, Wayne Fay <wa...@gmail.com> wrote:
>>>> The given workaround does not work for me because I cannot put values
>>>> in the pom.
>>>
>>> You can add properties via profiles.xml alongside your pom.xml.
>>>
>>> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>>>
>>> Wayne
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Ste
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
Ste

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


Re: different behaviour of surefire with maven 2.0.10

Posted by Dan Tran <da...@gmail.com>.
ummm, 2.0.10 as I understand, introduces this problem because it uses
surefire 2.4.3,

Now you claim its fixed the issue, could you elaborate on that?

Thanks

-D

On Sun, Mar 22, 2009 at 8:39 AM, Stefano Fornari
<st...@gmail.com> wrote:
> BTW, maven 2.1.0 fixes the problem!
>
> Ste
>
> On Thu, Mar 19, 2009 at 8:29 PM, Wayne Fay <wa...@gmail.com> wrote:
>>> The given workaround does not work for me because I cannot put values
>>> in the pom.
>>
>> You can add properties via profiles.xml alongside your pom.xml.
>>
>> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
>
> --
> Ste
>
> ---------------------------------------------------------------------
> 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


Re: different behaviour of surefire with maven 2.0.10

Posted by Stefano Fornari <st...@gmail.com>.
BTW, maven 2.1.0 fixes the problem!

Ste

On Thu, Mar 19, 2009 at 8:29 PM, Wayne Fay <wa...@gmail.com> wrote:
>> The given workaround does not work for me because I cannot put values
>> in the pom.
>
> You can add properties via profiles.xml alongside your pom.xml.
>
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Ste

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


Re: different behaviour of surefire with maven 2.0.10

Posted by Wayne Fay <wa...@gmail.com>.
> The given workaround does not work for me because I cannot put values
> in the pom.

You can add properties via profiles.xml alongside your pom.xml.

http://maven.apache.org/guides/introduction/introduction-to-profiles.html

Wayne

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


Re: different behaviour of surefire with maven 2.0.10

Posted by Stefano Fornari <st...@gmail.com>.
Hi Dan,
looking at the bug, it still does not answer (or at least I did not
get it) if this is a bug or the wanted behaviour.

The given workaround does not work for me because I cannot put values
in the pom.

Ste

On Thu, Mar 19, 2009 at 2:16 AM, Dan Tran <da...@gmail.com> wrote:
> see this issue for details
>
> https://jira.codehaus.org/browse/SUREFIRE-121
>
> -D
>
> On Wed, Mar 18, 2009 at 4:25 PM, Stefano Fornari
> <st...@gmail.com> wrote:
>> Hi Dan,
>> thanks fo the quick reply. But do you mean that this is the correct
>> behaviour of surefire 2.4.3? It seems odd to me.
>>
>> Ste
>>
>>
>>
>> On Thu, Mar 19, 2009 at 12:07 AM, Dan Tran <da...@gmail.com> wrote:
>>> maven 2.0.10 uses surefire 2.4.3 which will break your test scenario,
>>> you need to pin down your sure fire to 2.4.2
>>>
>>> and i think 2.0.9 uses 2.4.2
>>>
>>>
>>> -D
>>>



-- 
Ste

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


Re: different behaviour of surefire with maven 2.0.10

Posted by Dan Tran <da...@gmail.com>.
see this issue for details

https://jira.codehaus.org/browse/SUREFIRE-121

-D

On Wed, Mar 18, 2009 at 4:25 PM, Stefano Fornari
<st...@gmail.com> wrote:
> Hi Dan,
> thanks fo the quick reply. But do you mean that this is the correct
> behaviour of surefire 2.4.3? It seems odd to me.
>
> Ste
>
>
>
> On Thu, Mar 19, 2009 at 12:07 AM, Dan Tran <da...@gmail.com> wrote:
>> maven 2.0.10 uses surefire 2.4.3 which will break your test scenario,
>> you need to pin down your sure fire to 2.4.2
>>
>> and i think 2.0.9 uses 2.4.2
>>
>>
>> -D
>>
>>
>> On Wed, Mar 18, 2009 at 3:52 PM, Stefano Fornari
>> <st...@gmail.com> wrote:
>>> Sorry, I am not sure the zip went through. Here are the relevant classes...
>>>
>>> On Wed, Mar 18, 2009 at 11:48 PM, Stefano Fornari
>>> <st...@gmail.com> wrote:
>>>> Hi All,
>>>> Has anyone experiencing the same problem? Up to maven 2.0.9 I was used
>>>> to test the project with a command line similar to:
>>>>
>>>> mvn -D__TEST__=true test
>>>>
>>>> The test code uses System.getProperty("__TEST__") and gets the value
>>>> passed on the command line. With maven 2.0.10 this doe snot happen, so
>>>> the tests do not pass because of the missing property. Is this the
>>>> intended behaviour? Or is it a bug? I am attaching a test project if
>>>> anyone is kind to spend some time to try it out.
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>>> --
>>>> Ste
>>>>
>>>
>>>
>>>
>>> --
>>> Ste
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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


Re: different behaviour of surefire with maven 2.0.10

Posted by Stefano Fornari <st...@gmail.com>.
Hi Dan,
thanks fo the quick reply. But do you mean that this is the correct
behaviour of surefire 2.4.3? It seems odd to me.

Ste



On Thu, Mar 19, 2009 at 12:07 AM, Dan Tran <da...@gmail.com> wrote:
> maven 2.0.10 uses surefire 2.4.3 which will break your test scenario,
> you need to pin down your sure fire to 2.4.2
>
> and i think 2.0.9 uses 2.4.2
>
>
> -D
>
>
> On Wed, Mar 18, 2009 at 3:52 PM, Stefano Fornari
> <st...@gmail.com> wrote:
>> Sorry, I am not sure the zip went through. Here are the relevant classes...
>>
>> On Wed, Mar 18, 2009 at 11:48 PM, Stefano Fornari
>> <st...@gmail.com> wrote:
>>> Hi All,
>>> Has anyone experiencing the same problem? Up to maven 2.0.9 I was used
>>> to test the project with a command line similar to:
>>>
>>> mvn -D__TEST__=true test
>>>
>>> The test code uses System.getProperty("__TEST__") and gets the value
>>> passed on the command line. With maven 2.0.10 this doe snot happen, so
>>> the tests do not pass because of the missing property. Is this the
>>> intended behaviour? Or is it a bug? I am attaching a test project if
>>> anyone is kind to spend some time to try it out.
>>>
>>> Thanks in advance.
>>>
>>>
>>> --
>>> Ste
>>>
>>
>>
>>
>> --
>> Ste
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>

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


Re: different behaviour of surefire with maven 2.0.10

Posted by Dan Tran <da...@gmail.com>.
maven 2.0.10 uses surefire 2.4.3 which will break your test scenario,
you need to pin down your sure fire to 2.4.2

and i think 2.0.9 uses 2.4.2


-D


On Wed, Mar 18, 2009 at 3:52 PM, Stefano Fornari
<st...@gmail.com> wrote:
> Sorry, I am not sure the zip went through. Here are the relevant classes...
>
> On Wed, Mar 18, 2009 at 11:48 PM, Stefano Fornari
> <st...@gmail.com> wrote:
>> Hi All,
>> Has anyone experiencing the same problem? Up to maven 2.0.9 I was used
>> to test the project with a command line similar to:
>>
>> mvn -D__TEST__=true test
>>
>> The test code uses System.getProperty("__TEST__") and gets the value
>> passed on the command line. With maven 2.0.10 this doe snot happen, so
>> the tests do not pass because of the missing property. Is this the
>> intended behaviour? Or is it a bug? I am attaching a test project if
>> anyone is kind to spend some time to try it out.
>>
>> Thanks in advance.
>>
>>
>> --
>> Ste
>>
>
>
>
> --
> Ste
>
>
> ---------------------------------------------------------------------
> 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


Re: different behaviour of surefire with maven 2.0.10

Posted by Stefano Fornari <st...@gmail.com>.
Sorry, I am not sure the zip went through. Here are the relevant classes...

On Wed, Mar 18, 2009 at 11:48 PM, Stefano Fornari
<st...@gmail.com> wrote:
> Hi All,
> Has anyone experiencing the same problem? Up to maven 2.0.9 I was used
> to test the project with a command line similar to:
>
> mvn -D__TEST__=true test
>
> The test code uses System.getProperty("__TEST__") and gets the value
> passed on the command line. With maven 2.0.10 this doe snot happen, so
> the tests do not pass because of the missing property. Is this the
> intended behaviour? Or is it a bug? I am attaching a test project if
> anyone is kind to spend some time to try it out.
>
> Thanks in advance.
>
>
> --
> Ste
>



-- 
Ste