I started trying to build geronimo trunk using maven 3 and ran into a couple 
inconsistencies so far in our maven plugins.  I don't know if we were doing 
something unfortunate before.... I have no problem changing the geronimo code 
to something that will work on both mavens....

1. We were calling
org.apache.maven.artifact Artifact; //from dependencyNode.getRelatedArtifact() 
if not null, otherwise dependencyNode.getArtifact()
artifact.getVersionRange().getRecommendedVersion().toString()

on essentially every element in the unpruned dependency tree (our pruning rules 
are different from maven's).  This no longer works.  artifact.getVersionRange() 
is now null on, apparently, non-direct transitive dependencies.  The only 
workaround I've come across is to put all the dependencies where this is 
actually called in the pom the plugin runs on.

2.             Plugin plugin = (Plugin) 
project.getModel().getBuild().getPluginsAsMap().get("org.apache.geronimo.buildsupport:car-maven-plugin");
plugin.getExecutions() has changed.  I'm not exactly sure what it used to 
contain, but for a plugin that wasn't explicitly configured with an <execution> 
element in the pom it was either empty or had one element in it.  Now it 
contains elements for every mojo in the plugin.  I think I've figured out how 
to find the one I want, so this is not a big problem for me.  On the other 
hand, the code here was originally to do my own merging of configurations 
between parent pom and child because what maven was doing for me didn't work (I 
don't remember the details).  Has the merging been rewritten?  Or, is there a 
way to get object trees for each unmerged configuration so I can do it in my 
plugin code?

Although (2) is not really a problem for me I would like to know how to work 
around (1).

thanks
david jencks


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to