Re: dependency plugin - thoughts on providing a list of classes required at runtime to use with dependency:analyze?

2011-10-04 Thread Tobi

Hi Ryan,

Two questions -
How do I use the "analyzer" configuration parameter to swap out the
analyzer component (do I just add an artifact to the plugin dependency
that contains my analyzer and specify the class in the "analyzer"
configuration? - is there a way for me to have my analyzer take
additional configuration parameters?) [I've searched for a while, but
haven't found any examples, either for this plugin or for swapping
components in general in maven]
The component is created by Plexus (a IoC container), have a look at 
http://plexus.codehaus.org/. This is true for Maven 2.x , I'm not sure 
if Maven 3 is still using Plexus or has transitioned to Guice already.


Basically, you need to bundle your custom dependency analyzer with a 
"components.xml" file that describes how to wire your beans and there is 
also support for some special pre-processed "annotations" (inside 
JavaDoc comments) that allow you inject data from the  
section of the plugin.


You might want to check out 
https://github.com/toby1984/maven-dependency-analyzer-spring as a 
starting point.


Tobias



For things that are marked as required at runtime but have no
artifacts providing them - there should probably be a new category in
the reporting for the class itself "Classes needed at runtime but are
not found in any declared or undeclared dependency:" and have it dump
out the class names that aren't found in any of the dependencies or
transitive dependencies. (Or it could just print error level warnings
when it can't find a class in the artifacts anywhere)

Ryan

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




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



Re: Substitute for PlexusContainer#getLoggerManager() ?

2010-10-21 Thread Tobi



Tobias Gierke wrote:


Is there a way to get a Logger injected directly into the component


The usual pattern is to have the component extend AbstractLogEnabled.
Since I already need to inherit from a different class , this won't work 
... would implementing only the LogEnabled interface do the trick as well ?



- Tobias





Benjamin

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





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