Package org.eclipse.aether.tools
Class CollectConfiguration
java.lang.Object
org.eclipse.aether.tools.CollectConfiguration
This tool is used both from Resolver
as well as from Maven
to generate documentation for configuration keys. It scans the source files under a given root directory, collects the configuration keys declared in them and renders them into Velocity templates.
It relies on javadoc with a custom doclet to extract the configuration keys from the source files.
The doclet writes the discovered keys into an intermediate properties file, which is then read back and used to render the Velocity templates.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe mode of the generator, i.e. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringJavadoc block tag marking a constant field as a configuration key.The metadata fields collected per configuration key and written to / read from the intermediate properties file.protected static final Stringprotected static final StringText marker used to pre-select the source files to feed the doclet when scanning Maven sources.protected CollectConfiguration.Modeprotected Pathprotected Path -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncall()static voidreadDiscoveredKeys(Path intermediateFile) Reads back the intermediate properties file produced byConfigurationCollectorDocletinto the list of maps consumed by the Velocity templates.protected voidprotected voidCollects the source files underrootDirectoryand runsConfigurationCollectorDocletagainst them, having it write the discovered configuration keys into the given intermediate properties file.
-
Field Details
-
KEY
- See Also:
-
FIELDS
The metadata fields collected per configuration key and written to / read from the intermediate properties file. -
CONFIGURATION_MARKER
Javadoc block tag marking a constant field as a configuration key.- See Also:
-
MAVEN_CONFIGURATION_MARKER
Text marker used to pre-select the source files to feed the doclet when scanning Maven sources. Maven declares configuration keys via theorg.apache.maven.api.annotations.Configannotation.- See Also:
-
mode
-
templates
-
rootDirectory
-
outputDirectory
-
-
Constructor Details
-
CollectConfiguration
public CollectConfiguration()
-
-
Method Details
-
main
-
call
-
runDoclet
Collects the source files underrootDirectoryand runsConfigurationCollectorDocletagainst them, having it write the discovered configuration keys into the given intermediate properties file.- Throws:
Exception
-
readDiscoveredKeys
Reads back the intermediate properties file produced byConfigurationCollectorDocletinto the list of maps consumed by the Velocity templates.- Throws:
Exception
-
render
- Throws:
Exception
-