Fixing https://issues.apache.org/jira/browse/MDEP-753 proved more
difficult than it should have been, primarily due to the age and
non-standard approach of a lot of its code. I was barely able to make
the tests run in Eclipse and never got them to pass. I thought I'd
throw out a few notes I made while working on this.

maven-dependency-analyzer is based on a more than a decade old version
of plexus injection. Trying to update that breaks a lot of tests. The
whole structure is very weird. The most confusing part is in
DefaultProjectDependencyAnalyzerTest (which are the most critical
tests we have for this library) that use very old versions of
BuildTool, ProjectTool, and RepositoryTool to set up integration
tests. I spent some time trying to modernize this but ultimately ran
aground on the problem that there's no Mojo in this library so I
couldn't use AbstractMojoTestCase.

Someone else might have more success than me if they feel like giving
it a try. There are some parts of this library that do nothing but
obscure its API, and that we could rip out if we were willing to ship
a modernized version with a new package and artifact ID. Dependency
injection, in particular, really doesn't help us here. It seems
possible to eliminate half the packages, half the classes, and all the
interfaces with no loss in functionality. The library is massively
over-engineered for what it does.

The key to improving this at all is going to be figuring out how to
compile a Maven project from inside a unit test in a more modern
fashion. Or perhaps these tests can be converted to integration tests
as in some of the oher projects. I'm not sure. If anyone can figure
that out, it would help move this dependency off of Maven 2 APIs and
make it much more amenable to fixes and enhancements in the future.


-- 
Elliotte Rusty Harold
elh...@ibiblio.org

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

Reply via email to