Class: Dependabot::Maven::FileParser

Inherits:
FileParsers::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/maven/file_parser.rb,
lib/dependabot/maven/file_parser/pom_fetcher.rb,
lib/dependabot/maven/file_parser/repositories_finder.rb,
lib/dependabot/maven/file_parser/property_value_finder.rb,
lib/dependabot/maven/file_parser/maven_dependency_parser.rb

Overview

rubocop:disable Metrics/ClassLength

Defined Under Namespace

Classes: MavenDependencyParser, PomFetcher, PropertyValueFinder, RepositoriesFinder

Constant Summary collapse

DEPENDENCY_SELECTOR =

The following “dependencies” are candidates for updating:

  • The project’s parent

  • Any dependencies (incl. those in dependencyManagement or plugins)

  • Any plugins (incl. those in pluginManagement)

  • Any extensions

"project > parent, " \
"dependencies > dependency, " \
"extensions > extension, " \
"annotationProcessorPaths > path"
PLUGIN_SELECTOR =
"plugins > plugin"
EXTENSION_SELECTOR =
"extensions > extension"
TARGET_SELECTOR =
"target > locations > location[type='Maven'] > dependencies > dependency"
PLUGIN_ARTIFACT_ITEMS_SELECTOR =
"plugins > plugin > executions > execution > " \
"configuration > artifactItems > artifactItem"
PROPERTY_REGEX =

Regex to get the property name from a declaration that uses a property

/\$\{(?<property>.*?)\}/

Instance Method Summary collapse

Instance Method Details

#ecosystemObject



56
57
58
59
60
61
62
63
64
65
# File 'lib/dependabot/maven/file_parser.rb', line 56

def ecosystem
  @ecosystem ||= T.let(
    Ecosystem.new(
      name: ECOSYSTEM,
      package_manager: package_manager,
      language: language
    ),
    T.nilable(Ecosystem)
  )
end

#parseObject



47
48
49
50
51
52
53
# File 'lib/dependabot/maven/file_parser.rb', line 47

def parse
  if Dependabot::Experiments.enabled?(:maven_transitive_dependencies)
    parse_with_transitive_dependencies
  else
    parse_standard_dependencies
  end
end