Class Profile

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

Modifications to the build process which is activated based on environmental parameters or command line arguments.
See Also:
  • Field Details

  • Method Details

    • getId

      public String getId()
      The identifier of this build profile. This is used for command line activation, and identifies profiles to be merged.
      Returns:
      a String
    • getActivation

      public Activation getActivation()
      The conditional logic which will automatically trigger the inclusion of this profile.
      Returns:
      a Activation
    • getBuild

      public BuildBase getBuild()
      Information required to build the project.
      Returns:
      a BuildBase
    • with

      @Nonnull public Profile.Builder with()
      Creates a new builder with this object as the basis.
      Overrides:
      with in class ModelBase
      Returns:
      a Builder
    • withModules

      @Nonnull public Profile withModules(Collection<String> modules)
      Creates a new Profile instance using the specified modules.
      Overrides:
      withModules in class ModelBase
      Parameters:
      modules - the new Collection<String> to use
      Returns:
      a Profile with the specified modules
    • withDistributionManagement

      @Nonnull public Profile withDistributionManagement(DistributionManagement distributionManagement)
      Creates a new Profile instance using the specified distributionManagement.
      Overrides:
      withDistributionManagement in class ModelBase
      Parameters:
      distributionManagement - the new DistributionManagement to use
      Returns:
      a Profile with the specified distributionManagement
    • withProperties

      @Nonnull public Profile withProperties(Map<String,String> properties)
      Creates a new Profile instance using the specified properties.
      Overrides:
      withProperties in class ModelBase
      Parameters:
      properties - the new Map<String, String> to use
      Returns:
      a Profile with the specified properties
    • withDependencyManagement

      @Nonnull public Profile withDependencyManagement(DependencyManagement dependencyManagement)
      Creates a new Profile instance using the specified dependencyManagement.
      Overrides:
      withDependencyManagement in class ModelBase
      Parameters:
      dependencyManagement - the new DependencyManagement to use
      Returns:
      a Profile with the specified dependencyManagement
    • withDependencies

      @Nonnull public Profile withDependencies(Collection<Dependency> dependencies)
      Creates a new Profile instance using the specified dependencies.
      Overrides:
      withDependencies in class ModelBase
      Parameters:
      dependencies - the new Collection<Dependency> to use
      Returns:
      a Profile with the specified dependencies
    • withRepositories

      @Nonnull public Profile withRepositories(Collection<Repository> repositories)
      Creates a new Profile instance using the specified repositories.
      Overrides:
      withRepositories in class ModelBase
      Parameters:
      repositories - the new Collection<Repository> to use
      Returns:
      a Profile with the specified repositories
    • withPluginRepositories

      @Nonnull public Profile withPluginRepositories(Collection<Repository> pluginRepositories)
      Creates a new Profile instance using the specified pluginRepositories.
      Overrides:
      withPluginRepositories in class ModelBase
      Parameters:
      pluginRepositories - the new Collection<Repository> to use
      Returns:
      a Profile with the specified pluginRepositories
    • withReporting

      @Nonnull public Profile withReporting(Reporting reporting)
      Creates a new Profile instance using the specified reporting.
      Overrides:
      withReporting in class ModelBase
      Parameters:
      reporting - the new Reporting to use
      Returns:
      a Profile with the specified reporting
    • withId

      @Nonnull public Profile withId(String id)
      Creates a new Profile instance using the specified id.
      Parameters:
      id - the new String to use
      Returns:
      a Profile with the specified id
    • withActivation

      @Nonnull public Profile withActivation(Activation activation)
      Creates a new Profile instance using the specified activation.
      Parameters:
      activation - the new Activation to use
      Returns:
      a Profile with the specified activation
    • withBuild

      @Nonnull public Profile withBuild(BuildBase build)
      Creates a new Profile instance using the specified build.
      Parameters:
      build - the new BuildBase to use
      Returns:
      a Profile with the specified build
    • newInstance

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

      @Nonnull public static Profile newInstance(boolean withDefaults)
      Creates a new Profile 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 Profile
    • newBuilder

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

      @Nonnull public static Profile.Builder newBuilder(boolean withDefaults)
      Creates a new Profile 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 Profile.Builder newBuilder(Profile from)
      Creates a new Profile builder instance using the specified object as a basis. Equivalent to newBuilder(from, false).
      Parameters:
      from - the Profile instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

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

      public void setSource(String source)
    • getSource

      public String getSource()
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: