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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Profile instances. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProfile(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.BuilderCreates a newProfilebuilder instance.static Profile.BuildernewBuilder(boolean withDefaults) Creates a newProfilebuilder instance using default values or not.static Profile.BuildernewBuilder(Profile from) Creates a newProfilebuilder instance using the specified object as a basis.static Profile.BuildernewBuilder(Profile from, boolean forceCopy) Creates a newProfilebuilder instance using the specified object as a basis.static ProfileCreates a newProfileinstance.static ProfilenewInstance(boolean withDefaults) Creates a newProfileinstance using default values or not.voidtoString()with()Creates a new builder with this object as the basis.withActivation(Activation activation) Creates a newProfileinstance using the specified activation.Creates a newProfileinstance using the specified build.withDependencies(Collection<Dependency> dependencies) Creates a newProfileinstance using the specified dependencies.withDependencyManagement(DependencyManagement dependencyManagement) Creates a newProfileinstance using the specified dependencyManagement.withDistributionManagement(DistributionManagement distributionManagement) Creates a newProfileinstance using the specified distributionManagement.Creates a newProfileinstance using the specified id.withModules(Collection<String> modules) Deprecated.withPluginRepositories(Collection<Repository> pluginRepositories) Creates a newProfileinstance using the specified pluginRepositories.withProperties(Map<String, String> properties) Creates a newProfileinstance using the specified properties.withReporting(Reporting reporting) Creates a newProfileinstance using the specified reporting.withRepositories(Collection<Repository> repositories) Creates a newProfileinstance using the specified repositories.withSubprojects(Collection<String> subprojects) Creates a newProfileinstance 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, newBuilderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
-
with
Creates a new builder with this object as the basis. -
withModules
Deprecated.Creates a newProfileinstance using the specified modules.- Overrides:
withModulesin classModelBase- Parameters:
modules- the newCollection<String>to use- Returns:
- a
Profilewith the specified modules
-
withSubprojects
Creates a newProfileinstance using the specified subprojects.- Overrides:
withSubprojectsin classModelBase- Parameters:
subprojects- the newCollection<String>to use- Returns:
- a
Profilewith the specified subprojects
-
withDistributionManagement
Creates a newProfileinstance using the specified distributionManagement.- Overrides:
withDistributionManagementin classModelBase- Parameters:
distributionManagement- the newDistributionManagementto use- Returns:
- a
Profilewith the specified distributionManagement
-
withProperties
-
withDependencyManagement
Creates a newProfileinstance using the specified dependencyManagement.- Overrides:
withDependencyManagementin classModelBase- Parameters:
dependencyManagement- the newDependencyManagementto use- Returns:
- a
Profilewith the specified dependencyManagement
-
withDependencies
Creates a newProfileinstance using the specified dependencies.- Overrides:
withDependenciesin classModelBase- Parameters:
dependencies- the newCollection<Dependency>to use- Returns:
- a
Profilewith the specified dependencies
-
withRepositories
Creates a newProfileinstance using the specified repositories.- Overrides:
withRepositoriesin classModelBase- Parameters:
repositories- the newCollection<Repository>to use- Returns:
- a
Profilewith the specified repositories
-
withPluginRepositories
Creates a newProfileinstance using the specified pluginRepositories.- Overrides:
withPluginRepositoriesin classModelBase- Parameters:
pluginRepositories- the newCollection<Repository>to use- Returns:
- a
Profilewith the specified pluginRepositories
-
withReporting
Creates a newProfileinstance using the specified reporting.- Overrides:
withReportingin classModelBase- Parameters:
reporting- the newReportingto use- Returns:
- a
Profilewith the specified reporting
-
withId
-
withActivation
Creates a newProfileinstance using the specified activation.- Parameters:
activation- the newActivationto use- Returns:
- a
Profilewith the specified activation
-
withBuild
-
newInstance
-
newInstance
-
newBuilder
Creates a newProfilebuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newProfilebuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newProfilebuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theProfileinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newProfilebuilder instance using the specified object as a basis.- Parameters:
from- theProfileinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
setSource
-
getSource
-
toString
-