Class DependencyManagement

java.lang.Object
org.apache.maven.api.model.DependencyManagement
All Implemented Interfaces:
Serializable, InputLocationTracker

@Experimental @Generated @ThreadSafe @Immutable public class DependencyManagement extends Object implements Serializable, InputLocationTracker
Section for management of default dependency information for use in a group of POMs.
See Also:
  • Method Details

    • getDependencies

      @Nonnull public List<Dependency> getDependencies()
      The dependencies specified here are not used until they are referenced in a POM within the group. This allows the specification of a "standard" version for a particular dependency.
      Returns:
      a List<Dependency>
    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • with

      @Nonnull public DependencyManagement.Builder with()
      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withDependencies

      @Nonnull public DependencyManagement withDependencies(Collection<Dependency> dependencies)
      Creates a new DependencyManagement instance using the specified dependencies.
      Parameters:
      dependencies - the new Collection<Dependency> to use
      Returns:
      a DependencyManagement with the specified dependencies
    • newInstance

      @Nonnull public static DependencyManagement newInstance()
      Creates a new DependencyManagement instance. Equivalent to newInstance( true ).
      Returns:
      a new DependencyManagement
      See Also:
    • newInstance

      @Nonnull public static DependencyManagement newInstance(boolean withDefaults)
      Creates a new DependencyManagement instance using default values or not. Equivalent to newBuilder( withDefaults ).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new DependencyManagement
    • newBuilder

      @Nonnull public static DependencyManagement.Builder newBuilder()
      Creates a new DependencyManagement builder instance. Equivalent to newBuilder( true ).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static DependencyManagement.Builder newBuilder(boolean withDefaults)
      Creates a new DependencyManagement builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static DependencyManagement.Builder newBuilder(DependencyManagement from)
      Creates a new DependencyManagement builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the DependencyManagement instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static DependencyManagement.Builder newBuilder(DependencyManagement from, boolean forceCopy)
      Creates a new DependencyManagement builder instance using the specified object as a basis.
      Parameters:
      from - the DependencyManagement instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder