Package org.apache.maven.api.model
Class Build
java.lang.Object
org.apache.maven.api.model.PluginContainer
org.apache.maven.api.model.PluginConfiguration
org.apache.maven.api.model.BuildBase
org.apache.maven.api.model.Build
- All Implemented Interfaces:
- Serializable,- InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Build
extends BuildBase
implements Serializable, InputLocationTracker
The 
<build> element contains informations required to build the project.
 Default values are defined in Super POM.- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Build instances.
- 
Method SummaryModifier and TypeMethodDescriptionA set of build extensions to use from this project.The directory where compiled application classes are placed.This element specifies a directory containing the script sources of the project.This element specifies a directory containing the source of the project.The directory where compiled test classes are placed.This element specifies a directory containing the unit test source of the project.static Build.BuilderCreates a newBuildbuilder instance.static Build.BuildernewBuilder(boolean withDefaults) Creates a newBuildbuilder instance using default values or not.static Build.BuildernewBuilder(Build from) Creates a newBuildbuilder instance using the specified object as a basis.static Build.BuildernewBuilder(Build from, boolean forceCopy) Creates a newBuildbuilder instance using the specified object as a basis.static BuildCreates a newBuildinstance.static BuildnewInstance(boolean withDefaults) Creates a newBuildinstance using default values or not.toString()with()Creates a new builder with this object as the basis.withDefaultGoal(String defaultGoal) Creates a newBuildinstance using the specified defaultGoal.withDirectory(String directory) Creates a newBuildinstance using the specified directory.withExtensions(Collection<Extension> extensions) Creates a newBuildinstance using the specified extensions.withFilters(Collection<String> filters) Creates a newBuildinstance using the specified filters.withFinalName(String finalName) Creates a newBuildinstance using the specified finalName.withOutputDirectory(String outputDirectory) Creates a newBuildinstance using the specified outputDirectory.withPluginManagement(PluginManagement pluginManagement) Creates a newBuildinstance using the specified pluginManagement.withPlugins(Collection<Plugin> plugins) Creates a newBuildinstance using the specified plugins.withResources(Collection<Resource> resources) Creates a newBuildinstance using the specified resources.withScriptSourceDirectory(String scriptSourceDirectory) Creates a newBuildinstance using the specified scriptSourceDirectory.withSourceDirectory(String sourceDirectory) Creates a newBuildinstance using the specified sourceDirectory.withTestOutputDirectory(String testOutputDirectory) Creates a newBuildinstance using the specified testOutputDirectory.withTestResources(Collection<Resource> testResources) Creates a newBuildinstance using the specified testResources.withTestSourceDirectory(String testSourceDirectory) Creates a newBuildinstance using the specified testSourceDirectory.Methods inherited from class org.apache.maven.api.model.BuildBasegetDefaultGoal, getDirectory, getFilters, getFinalName, getResources, getTestResources, newBuilder, newBuilderMethods inherited from class org.apache.maven.api.model.PluginConfigurationgetPluginManagement, newBuilder, newBuilderMethods inherited from class org.apache.maven.api.model.PluginContainergetLocation, getPlugins, getPluginsAsMap, newBuilder, newBuilderMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.maven.api.model.InputLocationTrackergetLocation
- 
Method Details- 
getSourceDirectoryThis element specifies a directory containing the source of the project. The generated build system will compile the sources from this directory when the project is built. The path given is relative to the project descriptor. The default value issrc/main/java.- Returns:
- a String
 
- 
getScriptSourceDirectoryThis element specifies a directory containing the script sources of the project. This directory is meant to be different from the sourceDirectory, in that its contents will be copied to the output directory in most cases (since scripts are interpreted rather than compiled). The default value issrc/main/scripts.- Returns:
- a String
 
- 
getTestSourceDirectoryThis element specifies a directory containing the unit test source of the project. The generated build system will compile these directories when the project is being tested. The path given is relative to the project descriptor. The default value issrc/test/java.- Returns:
- a String
 
- 
getOutputDirectoryThe directory where compiled application classes are placed. The default value istarget/classes.- Returns:
- a String
 
- 
getTestOutputDirectoryThe directory where compiled test classes are placed. The default value istarget/test-classes.- Returns:
- a String
 
- 
getExtensionsA set of build extensions to use from this project.- Returns:
- a List<Extension>
 
- 
withCreates a new builder with this object as the basis.
- 
withPluginsCreates a newBuildinstance using the specified plugins.- Overrides:
- withPluginsin class- BuildBase
- Parameters:
- plugins- the new- Collection<Plugin>to use
- Returns:
- a Buildwith the specified plugins
 
- 
withPluginManagementCreates a newBuildinstance using the specified pluginManagement.- Overrides:
- withPluginManagementin class- BuildBase
- Parameters:
- pluginManagement- the new- PluginManagementto use
- Returns:
- a Buildwith the specified pluginManagement
 
- 
withDefaultGoalCreates a newBuildinstance using the specified defaultGoal.- Overrides:
- withDefaultGoalin class- BuildBase
- Parameters:
- defaultGoal- the new- Stringto use
- Returns:
- a Buildwith the specified defaultGoal
 
- 
withResourcesCreates a newBuildinstance using the specified resources.- Overrides:
- withResourcesin class- BuildBase
- Parameters:
- resources- the new- Collection<Resource>to use
- Returns:
- a Buildwith the specified resources
 
- 
withTestResourcesCreates a newBuildinstance using the specified testResources.- Overrides:
- withTestResourcesin class- BuildBase
- Parameters:
- testResources- the new- Collection<Resource>to use
- Returns:
- a Buildwith the specified testResources
 
- 
withDirectoryCreates a newBuildinstance using the specified directory.- Overrides:
- withDirectoryin class- BuildBase
- Parameters:
- directory- the new- Stringto use
- Returns:
- a Buildwith the specified directory
 
- 
withFinalNameCreates a newBuildinstance using the specified finalName.- Overrides:
- withFinalNamein class- BuildBase
- Parameters:
- finalName- the new- Stringto use
- Returns:
- a Buildwith the specified finalName
 
- 
withFiltersCreates a newBuildinstance using the specified filters.- Overrides:
- withFiltersin class- BuildBase
- Parameters:
- filters- the new- Collection<String>to use
- Returns:
- a Buildwith the specified filters
 
- 
withSourceDirectoryCreates a newBuildinstance using the specified sourceDirectory.- Parameters:
- sourceDirectory- the new- Stringto use
- Returns:
- a Buildwith the specified sourceDirectory
 
- 
withScriptSourceDirectoryCreates a newBuildinstance using the specified scriptSourceDirectory.- Parameters:
- scriptSourceDirectory- the new- Stringto use
- Returns:
- a Buildwith the specified scriptSourceDirectory
 
- 
withTestSourceDirectoryCreates a newBuildinstance using the specified testSourceDirectory.- Parameters:
- testSourceDirectory- the new- Stringto use
- Returns:
- a Buildwith the specified testSourceDirectory
 
- 
withOutputDirectoryCreates a newBuildinstance using the specified outputDirectory.- Parameters:
- outputDirectory- the new- Stringto use
- Returns:
- a Buildwith the specified outputDirectory
 
- 
withTestOutputDirectoryCreates a newBuildinstance using the specified testOutputDirectory.- Parameters:
- testOutputDirectory- the new- Stringto use
- Returns:
- a Buildwith the specified testOutputDirectory
 
- 
withExtensionsCreates a newBuildinstance using the specified extensions.- Parameters:
- extensions- the new- Collection<Extension>to use
- Returns:
- a Buildwith the specified extensions
 
- 
newInstanceCreates a newBuildinstance. Equivalent tonewInstance( true ).- Returns:
- a new Build
- See Also:
 
- 
newInstanceCreates a newBuildinstance using default values or not. Equivalent tonewBuilder( withDefaults ).build().- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Build
 
- 
newBuilderCreates a newBuildbuilder instance. Equivalent tonewBuilder( true ).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newBuildbuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newBuildbuilder instance using the specified object as a basis. Equivalent tonewBuilder( from, false ).- Parameters:
- from- the- Buildinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newBuildbuilder instance using the specified object as a basis.- Parameters:
- from- the- Buildinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
- 
toString
 
-