Add support for custom ProjectDependencyAnalyzer implementations
----------------------------------------------------------------

                 Key: MDEP-262
                 URL: http://jira.codehaus.org/browse/MDEP-262
             Project: Maven 2.x Dependency Plugin
          Issue Type: Improvement
          Components: analyze
            Reporter: Tobias Gierke
            Assignee: Brian Fox
         Attachments: maven-dependency-analyzer_1.2.patch, 
maven-dependency-plugin_2.2.patch

I've written a customized ProjectDependencyAnalyzer (includes dependencies from 
Spring XMLs) that I'd like to be able to use with the maven-dependency-plugin.

The current plugin implementation only supports a single 
ProjectDependencyAnalyzer component on the classpath (otherwise plexus will 
fail) and has no way of specifying which analyzer to use at runtime.

The appended patches add support for custom ProjectDependencyAnalyzer 
components to the plugin. The basic idea is to assign ProjectDependencyAnalyzer 
components a unique role-hint and let the plugin dynamically look-up the 
implementation to use by specifying the role-hint as configuration parameter.

1. maven-dependency-analyzer_1.2.patch

Patch against maven-dependency-analyzer 1.2-SNAPSHOT (trunk / r942613)

To apply patch: patch -p1 <maven-dependency-analyzer_1.2.patch

CHANGES:

- DefaultProjectDependencyAnalyzer component now has an additonal role-hint 
'default' so
plexus won't complain when multiple ProjectDependencyAnalyzer components are 
one the classpath
- changes the visibility of buildDependencyClasses() and 
findArtifactForClassName() from private to protected to allow subclassing
- buildDependencyClasses() now takes the artifact map as additional parameter 
so subclasses can call findArtifactForClassName() with it

2. maven-dependency-plugin_2.2.patch

Patch against maven-dependency-plugin 2.2-SNAPSHOT (trunk / r942613)

To apply patch: patch -p1 <maven-dependency-plugin_2.2.patch

CHANGES:

- AbstractDependencyMojo now has a new 'analyzer' parameter that is the role 
hint to use when
  looking up the ProjectDependencyAnalyzer from the container ( the default 
value is set to 'default' and thus references DefaultProjectDependencyAnalyzer)
- AbstractDependencyMojo now implements Contextualizable and dynamically looks 
up the ProjectDependencyAnalyzer component to use from the plexus container
- Integration test added that first buids and installs a custom dummy 
ProjectDependencyAnalyzer component
  and then runs dependency:analyze with this analyzer




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to