Yeah, I think we are definitely treading over some of the same path previously stamped out by the maven-eclipse-plugin.
There are several maps that expose keys for which there are no public constructors: groupId-artifactId-version is exposed in : - MavenSession#getProjectMap (groupId: artifactId : version) - MavenProject#getProjectReferences (groupId : artifactId : version) groupId-artifactId is exposed in : - MavenProject#getArtifactMap (groupId: artifactId) - MavenProject#getExtensionArtifactMap (groupId: artifactId) - MavenProject#getPluginArtifactMap (groupId: artifactId) groupId-artifactId-type[-classifier] is exposed in : - MavenProject#getManagedVersionMap (groupId: artifactId : type [: classifier]) I'm sure there are others I have missed. It feels like the dependency resolution needs to be its own (configurable) beast that maven-core and others can call upon. William On Sat, May 17, 2014 at 11:34 PM, Jason van Zyl <[email protected]> wrote: > It honestly should all be closed up. There are odd openings in the API to > allow strange forms of reactor resolution which is likely what you're > running into. The most bizarre form of reactor resolution occurs in the > maven-eclipse-plugin which essentially redoes reactor resolution entirely > because Maven considers resolution to have happened for an artifact when > there is a file present. When generating eclipse projects Maven has not run > to the point of producing a file so inside Maven when trying to find > referenced projects in the reactor it would fail with the reactor reader > that is present in master, but the plugin itself goes to some great lengths > to recast the logic from the file being present as being resolved to the > artifact being present as being resolved. > > There is way, way too much of the guts of Maven exposed for these types of > resolution activities. > > On May 8, 2014, at 6:30 PM, William Ferguson < > [email protected]> wrote: > > > Since MavenProject#getProjectReferences is public why is > > MavenProject#getProjectReferenceId (which is the only way of generating > the > > key for projectReferences without breaking encapsulation) private? > > > > NB in maven-project-2.2 #getProjectReferenceId used to be public. > > > > William > > Thanks, > > Jason > > ---------------------------------------------------------- > Jason van Zyl > Founder, Apache Maven > http://twitter.com/jvanzyl > http://twitter.com/takari_io > --------------------------------------------------------- > > Be not afraid of growing slowly, be only afraid of standing still. > > -- Chinese Proverb > > > > > > > > > >
