Annotation Interface Config
Annotation used to mark fields that represent configuration properties.
This annotation provides metadata about how the configuration property
should be handled, including its source, type, default value, and whether it's read-only.
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Property source, which determines when and where the property will be read from or set for consumption. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecifies the default value of the configuration property.boolean
Specifies whether the configuration property is read-only.Specifies the source of the configuration property, which determines when and where the property will be read from or set for consumption in the Maven build lifecycle.Specifies the type of the configuration property.
-
Element Details
-
source
Config.Source sourceSpecifies the source of the configuration property, which determines when and where the property will be read from or set for consumption in the Maven build lifecycle. The source indicates whether the property is: - Set by Maven itself at startup (SYSTEM_PROPERTIES) - Configured by users through external means like CLI options (USER_PROPERTIES) - Defined in the project's POM file (MODEL)- Returns:
- the source of the configuration property, defaults to USER_PROPERTIES
- See Also:
- Default:
USER_PROPERTIES
-
type
String typeSpecifies the type of the configuration property.- Returns:
- the fully qualified class name of the property type, defaults to "java.lang.String"
- Default:
"java.lang.String"
-
defaultValue
String defaultValueSpecifies the default value of the configuration property.- Returns:
- the default value as a string, defaults to empty string
- Default:
""
-
readOnly
boolean readOnlySpecifies whether the configuration property is read-only.- Returns:
- true if the property is read-only, false otherwise
- Default:
false
-