Class AlignOptions.Builder
java.lang.Object
eu.maveniverse.domtrip.maven.AlignOptions.Builder
- Enclosing class:
AlignOptions
Builder for
AlignOptions.- Since:
- 1.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an AlignOptions configured with the builder's current settings.namingConvention(AlignOptions.PropertyNamingConvention namingConvention) Sets the property naming convention override.propertyName(String propertyName) Sets an explicit property name, overriding auto-generation.propertyNameGenerator(Function<Coordinates, String> generator) Set a custom function that generates property names from dependency coordinates.Sets the dependency scope.versionSource(AlignOptions.VersionSource versionSource) Sets the version source override.versionStyle(AlignOptions.VersionStyle versionStyle) Sets the version style override.
-
Method Details
-
versionStyle
Sets the version style override.- Parameters:
versionStyle- the version style (null for auto-detection)- Returns:
- this builder
-
versionSource
Sets the version source override.- Parameters:
versionSource- the version source (null for auto-detection)- Returns:
- this builder
-
namingConvention
public AlignOptions.Builder namingConvention(AlignOptions.PropertyNamingConvention namingConvention) Sets the property naming convention override.- Parameters:
namingConvention- the naming convention (null for auto-detection)- Returns:
- this builder
-
propertyNameGenerator
Set a custom function that generates property names from dependency coordinates.Allows arbitrary naming patterns beyond the built-in conventions.
Example:
.propertyNameGenerator(coords -> coords.groupId().replace(".", "-") + "." + coords.artifactId() + ".version")- Parameters:
generator- the function to generate property names (null to clear)- Returns:
- this builder
- Since:
- 1.1.0
-
propertyName
Sets an explicit property name, overriding auto-generation.- Parameters:
propertyName- the property name to use- Returns:
- this builder
-
scope
Sets the dependency scope.- Parameters:
scope- the scope (e.g., "test", "provided")- Returns:
- this builder
-
build
Create an AlignOptions configured with the builder's current settings.No validation or additional processing is performed; the builder's field values (which may be
null) are copied directly into the created instance.- Returns:
- the constructed AlignOptions
-