maven/lib/dependabot/maven/file_parser/repositories_finder.rb
def repository_urls(pom:, exclude_inherited: false)
          repo_urls_in_pom =
            Nokogiri::XML(pom.content).
            css(REPOSITORY_SELECTOR).
            map { |node| node.at_css("url").content.strip.gsub(%r{/$}, "") }.
            reject { |url| contains_property?(url) && !evaluate_properties? }.
            select { |url| url.start_with?("http") }.
            map { |url| evaluated_value(url, pom) }

          return repo_urls_in_pom + [CENTRAL_REPO_URL] if exclude_inherited

          unless (parent = parent_pom(pom, repo_urls_in_pom))
            return repo_urls_in_pom + [CENTRAL_REPO_URL]
          end

          repo_urls_in_pom + repository_urls(pom: parent)
        end
# Collect all repository URLs from this POM and its parents
Collect all repository URLs from this POM and its parents
Collect all repository URLs from this POM and its parents
def repository_urls(pom:, exclude_inherited: false)
          repo_urls_in_pom =
            Nokogiri::XML(pom.content).
            css(REPOSITORY_SELECTOR).
            map { |node| node.at_css("url").content.strip.gsub(%r{/$}, "") }.
            reject { |url| contains_property?(url) && !evaluate_properties? }.
            select { |url| url.start_with?("http") }.
            map { |url| evaluated_value(url, pom) }
          return repo_urls_in_pom + [CENTRAL_REPO_URL] if exclude_inherited
          unless (parent = parent_pom(pom, repo_urls_in_pom))
            return repo_urls_in_pom + [CENTRAL_REPO_URL]
          end
          repo_urls_in_pom + repository_urls(pom: parent)
        end
def repository_urls ( pom : , exclude_inherited : false ) repo_urls_in_pom = Nokogiri :: XML ( pom . content ) . css ( REPOSITORY_SELECTOR ) . map { | node | node . at_css ( "url" ) . content . strip . gsub ( %r{ /$ } , "" ) } . reject { | url | contains_property? ( url ) && ! evaluate_properties? } . select { | url | url . start_with? ( "http" ) } . map { | url | evaluated_value ( url , pom ) } return repo_urls_in_pom + [ CENTRAL_REPO_URL ] if exclude_inherited unless ( parent = parent_pom ( pom , repo_urls_in_pom ) ) return repo_urls_in_pom + [ CENTRAL_REPO_URL ] end repo_urls_in_pom + repository_urls ( pom : parent ) end
Collect all repository URLs from this POM and its parents
Collect all repository URLs from this POM and its parents
pom
exclude_inherited