[ https://jira.codehaus.org/browse/SUREFIRE-867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=306946#comment-306946 ]
Pierre Le Roux commented on SUREFIRE-867: ----------------------------------------- Here is an example of one of my pom : {code} <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.6</version> <configuration> <junitArtifactName>junit:junit</junitArtifactName> <environmentVariables> <itcb.env>${itcb.env}</itcb.env> <testDatabaseHost>${testDatabaseHost}</testDatabaseHost> <testDatabaseUser>${testDatabaseUser}</testDatabaseUser> <testDatabasePassword>${testDatabasePassword}</testDatabasePassword> </environmentVariables> </configuration> </plugin> {code} I put this in a parent pom. I would like to generalize it as : * project A will have this in its POM : {code} <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.6</version> <configuration> <junitArtifactName>junit:junit</junitArtifactName> <allPropertiesAsEnvironmentVariables>true</allPropertiesAsEnvironmentVariables> </configuration> </plugin> {code} * Project B extend Project A and contains JUNIT test and properties {code} <properties> <projectSpecificProperty>a value</projectSpecificProperty> </properties> {code} In JUNIT test, I would like to use this property value as environment variables without having to redefine Surefire configuration in my B project. As i set {code}allPropertiesAsEnvironmentVariables{code} to {code}true{code}, {code}projectSpecificProperty{code} would be automatically added as environment variables, then i could use it in my tests. > Add a way to declare all project properties as environmentVariables > ------------------------------------------------------------------- > > Key: SUREFIRE-867 > URL: https://jira.codehaus.org/browse/SUREFIRE-867 > Project: Maven Surefire > Issue Type: Improvement > Components: Maven Surefire Plugin > Reporter: Pierre Le Roux > > It could be great to have a new option such as > *allPropertiesAsEnvironmentVariables* (by default : false) that would > retrieve all context properties (project, parent project and activated > profile properties) and add it as environment variables. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira