@Experimental @Generated @ThreadSafe @Immutable public class Build extends BuildBase implements Serializable, InputLocationTracker
<build>
element contains informations required to build the project.
Default values are defined in Super POM.Modifier and Type | Class and Description |
---|---|
static class |
Build.Builder
Builder class used to create Build instances.
|
Modifier and Type | Method and Description |
---|---|
List<Extension> |
getExtensions()
A set of build extensions to use from this project.
|
InputLocation |
getLocation(Object key)
Gets the location of the specified field in the input source.
|
String |
getOutputDirectory()
The directory where compiled application classes are placed.
|
String |
getScriptSourceDirectory()
This element specifies a directory containing the script sources of the
project.
|
String |
getSourceDirectory()
This element specifies a directory containing the source of the project.
|
String |
getTestOutputDirectory()
The directory where compiled test classes are placed.
|
String |
getTestSourceDirectory()
This element specifies a directory containing the unit test source of the
project.
|
static Build.Builder |
newBuilder()
Creates a new
Build builder instance. |
static Build.Builder |
newBuilder(boolean withDefaults)
Creates a new
Build builder instance using default values or not. |
static Build.Builder |
newBuilder(Build from)
Creates a new
Build builder instance using the specified object as a basis. |
static Build.Builder |
newBuilder(Build from,
boolean forceCopy)
Creates a new
Build builder instance using the specified object as a basis. |
static Build |
newInstance()
Creates a new
Build instance. |
static Build |
newInstance(boolean withDefaults)
Creates a new
Build instance using default values or not. |
Build.Builder |
with()
Creates a new builder with this object as the basis.
|
Build |
withDefaultGoal(String defaultGoal)
Creates a new
Build instance using the specified defaultGoal. |
Build |
withDirectory(String directory)
Creates a new
Build instance using the specified directory. |
Build |
withExtensions(Collection<Extension> extensions)
Creates a new
Build instance using the specified extensions. |
Build |
withFilters(Collection<String> filters)
Creates a new
Build instance using the specified filters. |
Build |
withFinalName(String finalName)
Creates a new
Build instance using the specified finalName. |
Build |
withOutputDirectory(String outputDirectory)
Creates a new
Build instance using the specified outputDirectory. |
Build |
withPluginManagement(PluginManagement pluginManagement)
Creates a new
Build instance using the specified pluginManagement. |
Build |
withPlugins(Collection<Plugin> plugins)
Creates a new
Build instance using the specified plugins. |
Build |
withResources(Collection<Resource> resources)
Creates a new
Build instance using the specified resources. |
Build |
withScriptSourceDirectory(String scriptSourceDirectory)
Creates a new
Build instance using the specified scriptSourceDirectory. |
Build |
withSourceDirectory(String sourceDirectory)
Creates a new
Build instance using the specified sourceDirectory. |
Build |
withTestOutputDirectory(String testOutputDirectory)
Creates a new
Build instance using the specified testOutputDirectory. |
Build |
withTestResources(Collection<Resource> testResources)
Creates a new
Build instance using the specified testResources. |
Build |
withTestSourceDirectory(String testSourceDirectory)
Creates a new
Build instance using the specified testSourceDirectory. |
getDefaultGoal, getDirectory, getFilters, getFinalName, getResources, getTestResources, newBuilder, newBuilder
getPluginManagement, newBuilder, newBuilder
flushPluginMap, getPlugins, getPluginsAsMap, newBuilder, newBuilder
public String getSourceDirectory()
src/main/java
.String
public String getScriptSourceDirectory()
src/main/scripts
.String
public String getTestSourceDirectory()
src/test/java
.String
public String getOutputDirectory()
target/classes
.String
public String getTestOutputDirectory()
target/test-classes
.String
@Nonnull public List<Extension> getExtensions()
List<Extension>
public InputLocation getLocation(Object key)
getLocation
in interface InputLocationTracker
getLocation
in class BuildBase
@Nonnull public Build.Builder with()
@Nonnull public Build withPlugins(Collection<Plugin> plugins)
Build
instance using the specified plugins.withPlugins
in class BuildBase
plugins
- the new Collection<Plugin>
to useBuild
with the specified plugins@Nonnull public Build withPluginManagement(PluginManagement pluginManagement)
Build
instance using the specified pluginManagement.withPluginManagement
in class BuildBase
pluginManagement
- the new PluginManagement
to useBuild
with the specified pluginManagement@Nonnull public Build withDefaultGoal(String defaultGoal)
Build
instance using the specified defaultGoal.withDefaultGoal
in class BuildBase
defaultGoal
- the new String
to useBuild
with the specified defaultGoal@Nonnull public Build withResources(Collection<Resource> resources)
Build
instance using the specified resources.withResources
in class BuildBase
resources
- the new Collection<Resource>
to useBuild
with the specified resources@Nonnull public Build withTestResources(Collection<Resource> testResources)
Build
instance using the specified testResources.withTestResources
in class BuildBase
testResources
- the new Collection<Resource>
to useBuild
with the specified testResources@Nonnull public Build withDirectory(String directory)
Build
instance using the specified directory.withDirectory
in class BuildBase
directory
- the new String
to useBuild
with the specified directory@Nonnull public Build withFinalName(String finalName)
Build
instance using the specified finalName.withFinalName
in class BuildBase
finalName
- the new String
to useBuild
with the specified finalName@Nonnull public Build withFilters(Collection<String> filters)
Build
instance using the specified filters.withFilters
in class BuildBase
filters
- the new Collection<String>
to useBuild
with the specified filters@Nonnull public Build withSourceDirectory(String sourceDirectory)
Build
instance using the specified sourceDirectory.sourceDirectory
- the new String
to useBuild
with the specified sourceDirectory@Nonnull public Build withScriptSourceDirectory(String scriptSourceDirectory)
Build
instance using the specified scriptSourceDirectory.scriptSourceDirectory
- the new String
to useBuild
with the specified scriptSourceDirectory@Nonnull public Build withTestSourceDirectory(String testSourceDirectory)
Build
instance using the specified testSourceDirectory.testSourceDirectory
- the new String
to useBuild
with the specified testSourceDirectory@Nonnull public Build withOutputDirectory(String outputDirectory)
Build
instance using the specified outputDirectory.outputDirectory
- the new String
to useBuild
with the specified outputDirectory@Nonnull public Build withTestOutputDirectory(String testOutputDirectory)
Build
instance using the specified testOutputDirectory.testOutputDirectory
- the new String
to useBuild
with the specified testOutputDirectory@Nonnull public Build withExtensions(Collection<Extension> extensions)
Build
instance using the specified extensions.extensions
- the new Collection<Extension>
to useBuild
with the specified extensions@Nonnull public static Build newInstance()
Build
instance.
Equivalent to newInstance( true )
.Build
newInstance(boolean)
@Nonnull public static Build newInstance(boolean withDefaults)
Build
instance using default values or not.
Equivalent to newBuilder( withDefaults ).build()
.withDefaults
- the boolean indicating whether default values should be usedBuild
@Nonnull public static Build.Builder newBuilder()
Build
builder instance.
Equivalent to newBuilder( true )
.Builder
newBuilder(boolean)
@Nonnull public static Build.Builder newBuilder(boolean withDefaults)
Build
builder instance using default values or not.withDefaults
- the boolean indicating whether default values should be usedBuilder
@Nonnull public static Build.Builder newBuilder(Build from)
Build
builder instance using the specified object as a basis.
Equivalent to newBuilder( from, false )
.from
- the Build
instance to use as a basisBuilder
@Nonnull public static Build.Builder newBuilder(Build from, boolean forceCopy)
Build
builder instance using the specified object as a basis.from
- the Build
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forcedBuilder
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.