I've been working quite a bit with Maven2 transitive dependencies at
work, and think that they're one of the best strengths of M2. In the
course of building quite a number of artifacts through build,
deployment, and update I've found that there are number of
improvements that can be made. So with the use cases that I've seen
at work and listening to what other devs in the community have
experienced, I'm proposing some enhancements.
These points are only an overview, and some are a variation or
enhancement on features in the Maven 2.1 design docs. I've gone into
more depth on the rationale and the features themselves on the
MavenUser Wiki at http://docs.codehaus.org/display/MAVENUSER/Improving
+Maven2+Dependency+Resolution :
* Virtual Dependencies (also know as spec jars)
* Environmental Context - Use the JDK environment and deploy
environment as part of the resolution phase. As an example, you
don't need to get JAXP API classes from a repository if compiling
with JDK 1.4
* Pinning Dependencies (Overrides) - If you have a fixed dependency
tree for a given release, it's important to be able to provided
patches that can override a node of the tree. <dependencyManagement>
only appears to handle this for parent-child projects.
* Filtering Parameters - Let the dependency resolution be able to
pick artifacts based on things like required JDK version, license,
signed/unsigned, tags,etc.
* Blacklisting artifacts - Not just repositories. This is
appropriate if you don't control the POM that's using the artifact to
be blacklisted.
* License Acknowledgment - Some commercial vendors (Sun) require a
clickthrough license before downloading. Also a user getting an
artifact under an Apache license with an LGPL dependency would need
to be notified that they are not only accepting the Apache License
but LGPL.
* Expose dependency resolution to client tools - Provide APIs so that
clients can pass in different artifacts with different filters to see
not only the multiple artifacts and paths that can resolve a
dependency, but also which one would be selected. This would be very
helpful for debugging and also to let UI tools visualize the
dependency graphs.
I don't think these features have easy workarounds in Maven 2.0.x,
but if there are, that would be great.
I've peer reviewed these with the folks at work as well and I'm
interested in feedback from the community on these improvements as
I'd like to get started working on them.
Thanks,
Garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]