If you add athe dependency to the dependencies section of the hpi plugin (little known part of he XML schema) you can override to the newer one. Surefire might be trickier. Also if using maven < 3 in a multimodule build the first time a plugin is instantiated wins, which made the trick mostly useless until maven 3 was released
On Thursday, 26 April 2012, Max Spring wrote: > The plugin I work on uses a library which in turn depends on > xalan:xalan:2.7.1. > When running as junit or through hpi:run, my plugin gets to see > xalan:xalan:2.6.0 and barfs. > > The dependency chain (with hpi:run) is > > org.kohsuke.stapler:maven-**stapler-plugin:jar:1.16:**compile > jaxen:jaxen:jar:1.1.1:compile > xom:xom:jar:1.0:compile > xalan:xalan:jar:2.6.0:compile > > Strangely it works in regular execution. > > Is there a way that my plugin can see xalan:2.7.1 even when running as > hpi:run or junit? > > I run again Jenkins 1.455. > > Thanks! > -Max >
