You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Kenney Westerhof <ke...@apache.org> on 2006/11/22 10:34:14 UTC

Re: [m2] Maven dependency analysis mojo

Hey,

I was just googling for a plugin like this. 

Are there any updates on this or something usable somewhere?

-- Kenney

Brett Porter wrote:
> I think shared for the component, and a new mojo for the report.
> 
> There's a JIRA I filed for this about a year and a half ago, so if you 
> can find that and mark it fixed, feel free :)
> 
> - Brett
> 
> On 23/10/2006, at 3:59 PM, Mark Hobson wrote:
> 
>> Hi Jason,
>>
>> That should be fine, I wrote it with that kind of separation in mind.
>> The class file analyser is totally independent of Maven, so not sure
>> whether that would move it out of maven-shared and into
>> plexus-components?  It's only the mojo that brings in the Maven
>> dependencies - any preference to where that should live too?
>>
>> Cheers,
>>
>> Mark
>>
>> Shall we say a maven-dependency-analyser project in maven-shared?
>>
>> On 23/10/06, Jason van Zyl <ja...@maven.org> wrote:
>>> Hey,
>>>
>>> Sounds good, but I think the most useful form of reuse is a Plexus
>>> component. This means it can easily be used in Mojos and any other
>>> Maven application that uses Plexus.
>>>
>>> We can then put it in maven-shared. Definitely sounds useful and
>>> allows you to do the "Optimize Dependencies" in the IDE
>>> eventually :-) Nice work.
>>>
>>> Thanks,
>>>
>>> Jason.
>>>
>>>
>>>
>>> On 23 Oct 06, at 6:04 PM 23 Oct 06, Mark Hobson wrote:
>>>
>>> > Hi there,
>>> >
>>> > I've written a mojo that analyses the current project's dependencies
>>> > against those that are declared in the pom.  It uses ASM to determine
>>> > the actual class dependencies from the project's compiled classes and
>>> > test classes, and then compares these against the classes held within
>>> > the project's artifact jars.  This produces the following information:
>>> >
>>> > * Used declared dependencies
>>> > * Used undeclared dependencies
>>> > * Unused dependencies
>>> >
>>> > The question is where it should live?  Initial suggestions would be
>>> > either maven-dependency-plugin, maven-help-plugin or a new maven/mojo
>>> > plugin.  It currently just outputs this information to the log, but
>>> > future extensions could include:
>>> >
>>> > - Create a report of the dependency analysis
>>> > - Rewrite the POM to add used undeclared dependencies
>>> > - Rewrite the POM to remove unused dependencies
>>> > - Integration to highlight used undeclared and unused dependencies
>>> > with:
>>> >    - maven-project-info-reports-plugin dependency report
>>> >    - maven-project-info-reports-plugin dependency graph
>>> >    - m2eclipse POM editor (unused dependencies -> warning annotations
>>> > on <dependency> blocks, etc.)
>>> >
>>> > I can supply a corresponding initial patch if someone could suggest
>>> > where it should reside.
>>> >
>>> > Cheers,
>>> >
>>> > Mark
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> > For additional commands, e-mail: dev-help@maven.apache.org
>>> >
>>> >
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

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


Re: [m2] Maven dependency analysis mojo

Posted by Mark Hobson <ma...@gmail.com>.
On 22/11/06, Mark Hobson <ma...@gmail.com> wrote:
> I've got a working shared component and plugin here.  I was waiting
> until I had time to write javadoc and some comprehensive tests before
> submitting it, but am happy to submit it in it's present state and
> then add tests later.  I'll raise an issue and attach it as is.

Done: http://jira.codehaus.org/browse/MNG-2676

Let me know if you have any probs or suggestions.

Mark

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


Re: [m2] Maven dependency analysis mojo

Posted by Mark Hobson <ma...@gmail.com>.
Hi Kenney,

On 22/11/06, Kenney Westerhof <ke...@apache.org> wrote:
> I was just googling for a plugin like this.
>
> Are there any updates on this or something usable somewhere?

I've got a working shared component and plugin here.  I was waiting
until I had time to write javadoc and some comprehensive tests before
submitting it, but am happy to submit it in it's present state and
then add tests later.  I'll raise an issue and attach it as is.

Cheers,

Mark

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