You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Todd Chapman <to...@chaka.net> on 2014/01/23 20:56:18 UTC

Maven user-defined properties inside plugin configuration.

Hi,

I'm using Maven properties inside a .properties file:

$ cat test/Platform.properties

client.identifier=${test.client.identifier}
client.environment.code=${test.client.environment}
admin.environment.code=${test.admin.environment}
admin.environment.xml=${test.admin.environment.xml}

I'm trying to set some of these properties from inside the surefire plugin
configuration, but it is not recognized. Can anyone tell me why this is?
Thanks!

        <profile>
            <id>test-design</id>
            <properties>

<test.admin.environment>${admin.environment.code}</test.admin.environment>

<test.admin.environment.xml>${admin.environment.xml}</test.admin.environment.xml>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.9</version>
                        <executions>
                            <execution>
                                <id>execute-design-tests</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <skip>false</skip>
                                    <excludes>

<exclude>com/company/rstesttransaction/**/*.java</exclude>
                                    </excludes>
                                    <properties>

<test.client.identifier>admin.client</test.client.identifier>

<test.client.environment>dev</test.client.environment>
                                    </properties>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>