You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Evan Worley <ev...@gmail.com> on 2007/12/11 01:02:14 UTC

How to access classpath from a test running in maven/surefire

One of the classes that is used in a test explores the classpath to search
for classes with a specific annotation.  This test works fine in the IDE
because when the junit runner runs the test, the "java.class.path"
environment variable is set as expected and thus I can search this
classpath.

When running from maven,  that environment variable contains only the maven
resources and does not contain any of the test's dependent jars.

Any ideas?

Thanks much,
Evan