Aside from the potential for solving this in the new project builder code, the existing implementation has a major limitation:

If a parent POM specified a child in its dependencyManagement section with scope == import, and that child specifies this parent POM in its <parent/> section, then you wind up with an infinite loop in the old project-builder code. This is because the parent project instance isn't quite built at the point where it tries to import dependencyManagement from those dependencies with scope == import. If one of those dependencies refers to the current project as its parent, then it will try to build the current/parent POM once again, which will cause the cycle to start all over again from the top.

If we can find an elegant way to handle the import problem, I'm all for it. Particularly if we can backport it (or at least the concept) to 2.0.x/2.1.x. ;-)

-john

Shane Isbell wrote:
I've been refactoring more of the project builder code and encountered a
rule that if a dependencyManagement/dependencies/dependency element has
type=pom and scope=import, the dependency management section of that
dependency should be imported into the containing pom model. This is a
one-off rule that doesn't easily fit into the new project builder which
keeps all pom specific rules in the PomClassicTransformer class. This type
of behavior could be handled instead by mixins/imports within the latest
maven-shared-model code. The way this would work is that you could use a
mavenImport tag in the dependencyManagement section of the pom and then the
framework would handle importing the xml fragment containing the dependency
info. Thoughts?

Shane


--
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.ejlife.net/blogs/buildchimp/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to