I've done something for the javaee6 archetypes at mojo. I suppose you are talking the same problem. Only compilation now, not surefire. It's a solution within current constraints only. When leaving these behind, I would go for endorsed scope. http://svn.codehaus.org/mojo/trunk/mojo/mojo-archetypes/webapp-javaee6/src/main/resources/archetype-resources/pom.xml
Milos On Mon, Nov 9, 2009 at 10:55 PM, Daniel Kulp <dk...@apache.org> wrote: > > While at ApacheCon last week, I talked to Jarek Gawor a bit and then > followed > up with a quick conversation with Brett about a problem that is soon going > to > hit CXF/Axis2/Geronimo. > > Basically, we're going to need a mechanism to easily "endorse" a few api > jars > when we call javac and when surefire runs. I'm ok with limiting the > endorsing to when those plugins are in their "fork" mode. There are a few > options that could be pursued: > > 1) Require all developers to drop some jars in jre/lib/endorsed. That > really > sucks. Not exactly viable, IMO. > > 2) Require all devs to copy the jars someplace and add > -Djava.endorsed.dirs=.. > to their MAVEN_OPTS. Also sucks. > > 3) In all modules, configure dependency:copy to copy the artifacts into a > dir > in target, then add the -D thing as system flags for compiler plugin and > surefire. This is better than (2) as it can be all automatic in the poms, > but > it's a ton of configuration if dealing with a lot of poms and projects and > such. > > 4) Add some mechanism to compiler and surefire (and maybe others) to do > some > of (3) automatically. I'm thinking something like: > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <endorsedArtifacts> > <endorsedArtifact> > <groupId>...</groupId> > <artifactId>...</artifactId> > <version>....</version> > </endorsedArtifact> > </endorsedArtifacts> > </configuration> > </plugin> > > and similar configuration for surefire. Maybe make <version> optional and > it > would pick up a version from a dependency. > > 5) Maybe some extension to the ToolChains stuff (which I don't know enough > about, need to dig further if this is viable) to handle this. > > Anyway, does anyone have any other thoughts? > > -- > Daniel Kulp > dk...@apache.org > http://www.dankulp.com/blog > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >