maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bertram, Alexander" <>
Subject Plugins and project classpath
Date Fri, 11 Jan 2013 09:00:34 GMT
Hi there,
I'm working on the maven plugin for Renjin (R on the JVM) and had a
question about best practices for plugin goals that require project

The renjin-maven-plugin has a compile-namespace goal and a test goal, which
both evaluate R scripts in src/main/R, and so require that the project's
dependencies be included on the classpath.

I've written it now [1] so that the plugin creates a new ClassLoader with
the necessary dependencies. This is a bit awkward however -- as far as I
can tell this means I have to use reflection to communicate between the
Mojo and the evaluator, and then only using types loaded by the system
class loader (and so common to both classloaders). I'm not sure how to
properly do logging, for example.

It also exhausts the permgen space, which you can of course fix with a
MAVEN_OPTS flag, but it will be an extra annoyance to users.

What's the best way to go about this? Should I create a new JVM like
surefire does? Am I just implementing the classloader strategy poorly? Is
there another way to signal to maven that my plugin needs project



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message