Package org.apache.maven.api.model
Class BuildBase
java.lang.Object
org.apache.maven.api.model.PluginContainer
org.apache.maven.api.model.PluginConfiguration
org.apache.maven.api.model.BuildBase
- All Implemented Interfaces:
Serializable
,InputLocationTracker
- Direct Known Subclasses:
Build
@Experimental
@Generated
@ThreadSafe
@Immutable
public class BuildBase
extends PluginConfiguration
implements Serializable, InputLocationTracker
Build configuration in a profile.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create BuildBase instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
BuildBase
(BuildBase.Builder builder) Constructor for this class, to be called from its subclasses andBuildBase.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionThe default goal (or phase in Maven 2) to execute when none is specified for the project.The directory where all files generated by the build are placed.The list of filter properties files that are used when filtering is enabled.The filename (excluding the extension, and with no path information) that the produced artifact will be called.getLocation
(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.This element describes all the classpath resources such as properties files associated with a project.This element describes all the classpath resources such as properties files associated with a project's unit tests.static BuildBase.Builder
Creates a newBuildBase
builder instance.static BuildBase.Builder
newBuilder
(boolean withDefaults) Creates a newBuildBase
builder instance using default values or not.static BuildBase.Builder
newBuilder
(BuildBase from) Creates a newBuildBase
builder instance using the specified object as a basis.static BuildBase.Builder
newBuilder
(BuildBase from, boolean forceCopy) Creates a newBuildBase
builder instance using the specified object as a basis.static BuildBase
Creates a newBuildBase
instance.static BuildBase
newInstance
(boolean withDefaults) Creates a newBuildBase
instance using default values or not.toString()
with()
Creates a new builder with this object as the basis.withDefaultGoal
(String defaultGoal) Creates a newBuildBase
instance using the specified defaultGoal.withDirectory
(String directory) Creates a newBuildBase
instance using the specified directory.withFilters
(Collection<String> filters) Creates a newBuildBase
instance using the specified filters.withFinalName
(String finalName) Creates a newBuildBase
instance using the specified finalName.withPluginManagement
(PluginManagement pluginManagement) Creates a newBuildBase
instance using the specified pluginManagement.withPlugins
(Collection<Plugin> plugins) Creates a newBuildBase
instance using the specified plugins.withResources
(Collection<Resource> resources) Creates a newBuildBase
instance using the specified resources.withTestResources
(Collection<Resource> testResources) Creates a newBuildBase
instance using the specified testResources.Methods inherited from class org.apache.maven.api.model.PluginConfiguration
getPluginManagement, newBuilder, newBuilder
Methods inherited from class org.apache.maven.api.model.PluginContainer
getImportedFrom, getPlugins, getPluginsAsMap, 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
-
Constructor Details
-
BuildBase
Constructor for this class, to be called from its subclasses andBuildBase.Builder
.- See Also:
-
-
Method Details
-
getDefaultGoal
The default goal (or phase in Maven 2) to execute when none is specified for the project. Note that in case of a build with subprojects, only the default goal of the top-level project is relevant, i.e. the default goals of subprojects are ignored. Since Maven 3, multiple goals/phases can be separated by whitespace.- Returns:
- a
String
-
getResources
This element describes all the classpath resources such as properties files associated with a project. These resources are often included in the final package. The default value issrc/main/resources
.- Returns:
- a
List<Resource>
-
getTestResources
This element describes all the classpath resources such as properties files associated with a project's unit tests. The default value issrc/test/resources
.- Returns:
- a
List<Resource>
-
getDirectory
The directory where all files generated by the build are placed. The default value istarget
.- Returns:
- a
String
-
getFinalName
The filename (excluding the extension, and with no path information) that the produced artifact will be called. The default value is${artifactId}-${version}
.- Returns:
- a
String
-
getFilters
The list of filter properties files that are used when filtering is enabled.- Returns:
- a
List<String>
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
- Overrides:
getLocation
in classPluginConfiguration
-
getLocationKeys
Gets the keys of the locations of the input source.- Overrides:
getLocationKeys
in classPluginConfiguration
-
with
Creates a new builder with this object as the basis.- Overrides:
with
in classPluginConfiguration
- Returns:
- a
Builder
-
withPlugins
Creates a newBuildBase
instance using the specified plugins.- Overrides:
withPlugins
in classPluginConfiguration
- Parameters:
plugins
- the newCollection<Plugin>
to use- Returns:
- a
BuildBase
with the specified plugins
-
withPluginManagement
Creates a newBuildBase
instance using the specified pluginManagement.- Overrides:
withPluginManagement
in classPluginConfiguration
- Parameters:
pluginManagement
- the newPluginManagement
to use- Returns:
- a
BuildBase
with the specified pluginManagement
-
withDefaultGoal
Creates a newBuildBase
instance using the specified defaultGoal.- Parameters:
defaultGoal
- the newString
to use- Returns:
- a
BuildBase
with the specified defaultGoal
-
withResources
Creates a newBuildBase
instance using the specified resources.- Parameters:
resources
- the newCollection<Resource>
to use- Returns:
- a
BuildBase
with the specified resources
-
withTestResources
Creates a newBuildBase
instance using the specified testResources.- Parameters:
testResources
- the newCollection<Resource>
to use- Returns:
- a
BuildBase
with the specified testResources
-
withDirectory
Creates a newBuildBase
instance using the specified directory.- Parameters:
directory
- the newString
to use- Returns:
- a
BuildBase
with the specified directory
-
withFinalName
Creates a newBuildBase
instance using the specified finalName.- Parameters:
finalName
- the newString
to use- Returns:
- a
BuildBase
with the specified finalName
-
withFilters
Creates a newBuildBase
instance using the specified filters.- Parameters:
filters
- the newCollection<String>
to use- Returns:
- a
BuildBase
with the specified filters
-
newInstance
Creates a newBuildBase
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
BuildBase
- See Also:
-
newInstance
Creates a newBuildBase
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
BuildBase
-
newBuilder
Creates a newBuildBase
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newBuildBase
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 newBuildBase
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theBuildBase
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newBuildBase
builder instance using the specified object as a basis.- Parameters:
from
- theBuildBase
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
toString
- Overrides:
toString
in classPluginConfiguration
- See Also:
-