maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <skitch...@apache.org>
Subject Passing maven variables as system properties
Date Fri, 10 Mar 2006 02:53:03 GMT
Hi,

I'm trying to store some maven vars into system properties so I can
access them from unit test code:

     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemProperties>
            <property>
              <name>core-static</name>
              <value>${project.build.outputDirectory}/</value>
            </property>
            <property>
              <name>core-static-tests</name>
              <value>${project.build.testOutputDirectory}/</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>

However the value of
   System.getProperty("core-static")
is literally "${project.build.outputDirectory}", not the expanded value.

Does anyone know how I can pass the value of this expression?

Thanks,

Simon


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


Mime
View raw message