librariesio / bibliothecary

:notebook_with_decorative_cover: Libraries.io Package Manager Manifest Parsers
https://libraries.io/rubygems/bibliothecary
GNU Affero General Public License v3.0
90 stars 36 forks source link

Maven.extract_pom_info: add support for more lookup variable namespaces. #567

Closed tiegz closed 1 year ago

tiegz commented 1 year ago

In Bibliothecary::Parsers::Maven.extract_pom_info currently we allow you to lookup a pom element with a variable and we'll try to interpolate it, e.g.:

<scm><url>${scm.url}</url></scm>

But you might also want to reference the element in the project namespace:

<scm><url>${project.scm.url}</url></scm>

Or in the project's parent namespace:

<scm><url>${project.parent.scm.url}</url></scm>

This adds support for the latter 2 lookups.

(interpolation was originally added in https://github.com/librariesio/bibliothecary/pull/456)