Package org.apache.maven.api.model
Class Profile
java.lang.Object
org.apache.maven.api.model.ModelBase
org.apache.maven.api.model.Profile
- All Implemented Interfaces:
Serializable
,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Profile
extends ModelBase
implements Serializable, InputLocationTracker
Modifications to the build process which is activated based on environmental
parameters or command line arguments.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Profile instances. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Profile
(Profile.Builder builder) Constructor for this class, to be called from its subclasses andProfile.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionThe conditional logic which will automatically trigger the inclusion of this profile.getBuild()
Information required to build the project.getId()
The identifier of this build profile.static Profile.Builder
Creates a newProfile
builder instance.static Profile.Builder
newBuilder
(boolean withDefaults) Creates a newProfile
builder instance using default values or not.static Profile.Builder
newBuilder
(Profile from) Creates a newProfile
builder instance using the specified object as a basis.static Profile.Builder
newBuilder
(Profile from, boolean forceCopy) Creates a newProfile
builder instance using the specified object as a basis.static Profile
Creates a newProfile
instance.static Profile
newInstance
(boolean withDefaults) Creates a newProfile
instance using default values or not.void
toString()
with()
Creates a new builder with this object as the basis.withActivation
(Activation activation) Creates a newProfile
instance using the specified activation.Creates a newProfile
instance using the specified build.withDependencies
(Collection<Dependency> dependencies) Creates a newProfile
instance using the specified dependencies.withDependencyManagement
(DependencyManagement dependencyManagement) Creates a newProfile
instance using the specified dependencyManagement.withDistributionManagement
(DistributionManagement distributionManagement) Creates a newProfile
instance using the specified distributionManagement.Creates a newProfile
instance using the specified id.withModules
(Collection<String> modules) Deprecated.withPluginRepositories
(Collection<Repository> pluginRepositories) Creates a newProfile
instance using the specified pluginRepositories.withProperties
(Map<String, String> properties) Creates a newProfile
instance using the specified properties.withReporting
(Reporting reporting) Creates a newProfile
instance using the specified reporting.withRepositories
(Collection<Repository> repositories) Creates a newProfile
instance using the specified repositories.withSubprojects
(Collection<String> subprojects) Creates a newProfile
instance using the specified subprojects.Methods inherited from class org.apache.maven.api.model.ModelBase
getDependencies, getDependencyManagement, getDistributionManagement, getImportedFrom, getLocation, getLocationKeys, getLocationKeyStream, getModules, getPluginRepositories, getProperties, getReporting, getRepositories, getSubprojects, newBuilder, newBuilder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.maven.api.model.InputLocationTracker
getImportedFrom, getLocation
-
Field Details
-
SOURCE_POM
- See Also:
-
SOURCE_SETTINGS
- See Also:
-
-
Constructor Details
-
Profile
Constructor for this class, to be called from its subclasses andProfile.Builder
.- See Also:
-
-
Method Details
-
getId
The identifier of this build profile. This is used for command line activation, and identifies profiles to be merged.- Returns:
- a
String
-
getActivation
The conditional logic which will automatically trigger the inclusion of this profile.- Returns:
- a
Activation
-
getBuild
Information required to build the project.- Returns:
- a
BuildBase
-
with
Creates a new builder with this object as the basis. -
withModules
Deprecated.Creates a newProfile
instance using the specified modules.- Overrides:
withModules
in classModelBase
- Parameters:
modules
- the newCollection<String>
to use- Returns:
- a
Profile
with the specified modules
-
withSubprojects
Creates a newProfile
instance using the specified subprojects.- Overrides:
withSubprojects
in classModelBase
- Parameters:
subprojects
- the newCollection<String>
to use- Returns:
- a
Profile
with the specified subprojects
-
withDistributionManagement
Creates a newProfile
instance using the specified distributionManagement.- Overrides:
withDistributionManagement
in classModelBase
- Parameters:
distributionManagement
- the newDistributionManagement
to use- Returns:
- a
Profile
with the specified distributionManagement
-
withProperties
Creates a newProfile
instance using the specified properties.- Overrides:
withProperties
in classModelBase
- Parameters:
properties
- the newMap<String, String>
to use- Returns:
- a
Profile
with the specified properties
-
withDependencyManagement
Creates a newProfile
instance using the specified dependencyManagement.- Overrides:
withDependencyManagement
in classModelBase
- Parameters:
dependencyManagement
- the newDependencyManagement
to use- Returns:
- a
Profile
with the specified dependencyManagement
-
withDependencies
Creates a newProfile
instance using the specified dependencies.- Overrides:
withDependencies
in classModelBase
- Parameters:
dependencies
- the newCollection<Dependency>
to use- Returns:
- a
Profile
with the specified dependencies
-
withRepositories
Creates a newProfile
instance using the specified repositories.- Overrides:
withRepositories
in classModelBase
- Parameters:
repositories
- the newCollection<Repository>
to use- Returns:
- a
Profile
with the specified repositories
-
withPluginRepositories
Creates a newProfile
instance using the specified pluginRepositories.- Overrides:
withPluginRepositories
in classModelBase
- Parameters:
pluginRepositories
- the newCollection<Repository>
to use- Returns:
- a
Profile
with the specified pluginRepositories
-
withReporting
Creates a newProfile
instance using the specified reporting.- Overrides:
withReporting
in classModelBase
- Parameters:
reporting
- the newReporting
to use- Returns:
- a
Profile
with the specified reporting
-
withId
Creates a newProfile
instance using the specified id.- Parameters:
id
- the newString
to use- Returns:
- a
Profile
with the specified id
-
withActivation
Creates a newProfile
instance using the specified activation.- Parameters:
activation
- the newActivation
to use- Returns:
- a
Profile
with the specified activation
-
withBuild
Creates a newProfile
instance using the specified build.- Parameters:
build
- the newBuildBase
to use- Returns:
- a
Profile
with the specified build
-
newInstance
Creates a newProfile
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Profile
- See Also:
-
newInstance
Creates a newProfile
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Profile
-
newBuilder
Creates a newProfile
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newProfile
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newProfile
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theProfile
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newProfile
builder instance using the specified object as a basis.- Parameters:
from
- theProfile
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
setSource
-
getSource
-
toString
-