[
https://issues.apache.org/jira/browse/IVY-616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jim Bonanno updated IVY-616:
----------------------------
Attachment: patch2.txt
The implementation has been consolidated to the PomModuleDescriptorParser and
should be a more generic solution. The parser now looks for the
dependencyManagement elements and adds the dependencies to a properties map.
There is a new signature for invoking the parser that allows setting the
property map, enabling the desired properties to be aggregated. Currently,
only the dependencyManagement dependencies are aggregated, but this could be
enhanced in the future if other attributes are interesting. The parent parsing
will walk up the parent chain and aggregate the results.
The resolver support is also now more generic. There is support for all
AbstractResourceResolvers and a special case for dual and chains resolvers.
Nothing is specific to the ibiblio resolver. The resolvers are walked to build
up a list of possible Urls and then each one is tried until the Pom is found,
essentially findFirst=true
Also note that a parsing failure on the parent does not fail the original
parsing. We only hit this problem when we tried to resolve apache directory
server.
All the unit tests ran successfully for me.
> Maven Dependency Management is not used to determine artifact version
> ---------------------------------------------------------------------
>
> Key: IVY-616
> URL: https://issues.apache.org/jira/browse/IVY-616
> Project: Ivy
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.0.0-alpha-2
> Reporter: Jim Bonanno
> Fix For: 2.0.0-beta-1
>
> Attachments: patch.txt, patch2.txt
>
>
> We recently hit an issue with resolving some POMs with the ibiblio resolver
> and usepoms=true. The problem is that the version for a dependency can be
> stored in the dependency management section of a parent POM.
> The apache directory server is an example.
> http://repo1.maven.org/maven2/org/apache/directory/server/apacheds-server-main/1.5.0/apacheds-server-main-1.5.0.pom
> Note that the POM for the parent build artifact has the version information
> for the last 5 dependencies.
> The PomModuleDescriptorParser currently only builds a dependency descriptor
> if the groupId, artifactId and version are all set. So for the case of apache
> directory server, many of the transitive dependencies are ignored.
> I have been working on an extension to the PomModuleDescriptorParser that
> build the dependency management information at the end of the project/parent
> element by parsing the parent chain. Then if a dependency is found without a
> version, then the dependency management information is used. I attach the
> patch after some more testing.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.