I don't know if this is working, but give it a try:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.4.2</version>
        <configuration>
          <systemProperties>
            <property>
              <name>myClasspath</name>
              <value>${classpathElements}</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>

And then in your code:

System.getProperty("myClasspath")

Perhaps you have to do some postprocessing on the String, but this is
how the maven-surefire-plugin gets it classpath.

http://svn.apache.org/viewvc/maven/surefire/tags/surefire-2.4.3/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java?view=markup

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Thu, Apr 16, 2009 at 12:45 AM, hbf <[email protected]> wrote:
> System.getProperty("java.class.path")
> + "\" " + MyUnitTest.getCanonicalName());

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to