You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lasse Koskela <la...@gmail.com> on 2007/05/23 06:35:55 UTC

[Maven 2]

Hi,

I'm trying to convert the open source JUnit extension called JspTest
to use Maven2 for the build and I'm running into trouble with how
Maven's Surefire test runner plugin seems to "hide" the classpath from
the executing code.

The issue stems from the need for a unit test to be able to compile
Java source code (generated from JSP source files), which obviously
needs all sorts of J2EE stuff in the classpath. These dependencies
have been defined in the pom.xml and are visible just fine when
compiling the framework itself and when running the tests, but when
those tests (indirectly) attempt to use the same dependencies to build
up a classpath for a new "javac" process I get all kinds of
"symbol/package/class not found" compilation errors because
System.getProperty("java.class.path") returns only some
maven/surefire/plexus libraries and not a single dependency (not even
the "target/classes" or "target/test-classes" directories).

If I were talking about a plugin, I could have the dependencies be
injected to the Mojo through properties but I'm not talking about a
plugin so that's not an option.

So, I guess my question is how can I get access to the Maven
dependencies and/or the full classpath?


best regards,
Lasse

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