Package org.gradle.api.artifacts.maven

## Interface Conf2ScopeMappingContainer

-     @Deprecated
      public interface Conf2ScopeMappingContainer

  Deprecated.
  Defines a set of rules for how to map the Gradle dependencies to a POM. This mapping is based on the configuration the dependencies belong to.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `COMPILE` | Deprecated.
    `static java.lang.String` | `PROVIDED` | Deprecated.
    `static java.lang.String` | `RUNTIME` | Deprecated.
    `static java.lang.String` | `TEST` | Deprecated.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Conf2ScopeMappingContainer` | `addMapping​(int priority, Configuration configuration, java.lang.String scope)` | Deprecated. Specifies that dependencies of a certain configuration should be mapped against a certain Maven scope.
    `Conf2ScopeMapping` | `getMapping​(java.util.Collection<Configuration> configurations)` | Deprecated. Returns a scope that corresponds to the given configurations.
    `java.util.Map<Configuration,​Conf2ScopeMapping>` | `getMappings()` | Deprecated. Returns a map with all the configuration to scope mappings.
    `boolean` | `isSkipUnmappedConfs()` | Deprecated. Returns whether unmapped configuration should be skipped or not.
    `void` | `setSkipUnmappedConfs​(boolean skipDependenciesWithUnmappedConfiguration)` | Deprecated. Sets, whether unmapped configuration should be skipped or not.

- - ### Field Detail

    - #### PROVIDED

          static final java.lang.String PROVIDED

      Deprecated.
      See Also:
        Constant Field Values

    - #### COMPILE

          static final java.lang.String COMPILE

      Deprecated.
      See Also:
        Constant Field Values

    - #### RUNTIME

          static final java.lang.String RUNTIME

      Deprecated.
      See Also:
        Constant Field Values

    - #### TEST

          static final java.lang.String TEST

      Deprecated.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### addMapping

          Conf2ScopeMappingContainer addMapping​(int priority,
                                                Configuration configuration,
                                                java.lang.String scope)

      Deprecated.

      Specifies that dependencies of a certain configuration should be mapped against a certain Maven scope. A configuration can be mapped to one and only one scope. If this method is called more than once for a particular configuration, the last call wins.

      See `getMapping(java.util.Collection)` for the rules how a scope is chosen from a set of mappings.
      Parameters:
        `priority` - a number that is used for comparison with the priority of other scopes.
        `configuration` - a Gradle configuration name (must not be null).
        `scope` - A Maven scope name (must not be null)
      Returns:
        this
      See Also:
        `getMapping(java.util.Collection)`

    - #### getMapping

          Conf2ScopeMapping getMapping​(java.util.Collection<Configuration> configurations)

      Deprecated.
      Returns a scope that corresponds to the given configurations. Dependencies of different configurations can be equal. But only one of those equals dependencies (which might differ in content) can be mapped to a POM (due to the nature of a Maven POM).

      Which scope is returned depends on the existing mappings. See `addMapping(int, Configuration, String)`. If only one configuration is mapped, this mapping is used to choose the scope. If more than one configuration of a dependency is mapped, and those mappings all map to the same scope, this scope is used. If more than one configuration is mapped and the mappings map to different scopes, the mapping with the highest priority is used. If there is more than one mapping with the highest priority and those mappings map to different scopes, an exception is thrown.

      Parameters:
        `configurations` - The configuration
      Returns:
        The scope corresponding to the given configurations. Returns null if no such scope can be found.
      See Also:
        `addMapping(int, Configuration, String)`

    - #### getMappings

          java.util.Map<Configuration,​Conf2ScopeMapping> getMappings()

      Deprecated.
      Returns a map with all the configuration to scope mappings. If no such mapping has been defined, an empty map is returned.
      See Also:
        `addMapping(int, Configuration, String)`

    - #### isSkipUnmappedConfs

          boolean isSkipUnmappedConfs()

      Deprecated.
      Returns whether unmapped configuration should be skipped or not. Defaults to true.
      See Also:
        `setSkipUnmappedConfs(boolean)`

    - #### setSkipUnmappedConfs

          void setSkipUnmappedConfs​(boolean skipDependenciesWithUnmappedConfiguration)

      Deprecated.
      Sets, whether unmapped configuration should be skipped or not. If this is set to false, dependencies belonging to unmapped configurations will be added to the Maven POM with no scope specified. This means they belong to the Maven default scope, which is 'compile'.