You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dan Fabulich (JIRA)" <ji...@codehaus.org> on 2007/11/24 22:37:57 UTC

[jira] Closed: (SUREFIRE-311) system properties within execution elements are not set

     [ http://jira.codehaus.org/browse/SUREFIRE-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Fabulich closed SUREFIRE-311.
---------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 2.4)

The POM file in this case is in error.  I feel bad saying that, though, because execution configuration is so confusing that it's arguably a bug in Maven that this sucks so much.  :-(

Anyway, the POM had two problems:

1) The POM neglected to declare any goals for its execution, so the execution did nothing.  Adding <goals><goal>test</goal></goals> enabled the execution.

1) Regardless, the POM neglected to disable the default execution of surefire, so surefire:test was going to run in its default execution, failing the build, before the non-default execution would be allowed to run.  

Putting <configuration><skip>true</skip></configuration> outside of the execution element disabled the regular surefire:test run.  Then I added <skip>false</skip> to the execution configuration to make the execution NOT skip the tests.

See the attached POM for an example of correct configuration.  I followed this example on the Wiki closely:

http://docs.codehaus.org/pages/viewpage.action?pageId=62120

> system properties within execution elements are not set
> -------------------------------------------------------
>
>                 Key: SUREFIRE-311
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-311
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.0 (2.2 plugin), 2.3
>         Environment: mac osx, java version "1.5.0_07"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
> Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
>            Reporter: Valerio Schiavoni
>         Attachments: my-app-surefire-error.tgz, pom.xml
>
>
> Configuring some system properties in the <execution> elements of the configuration doesn't result in those settings being available when executing tests.
> I'm attacching a toy project to demostrate the bug: mvn test results in a test failure; uncommenting the configuration element in the pom (and removing the <executions> element) result in a test success.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira