Class BuildInfoPlugin
java.lang.Object
software.amazon.smithy.build.plugins.BuildInfoPlugin
- All Implemented Interfaces:
SmithyBuildPlugin
Writes a build info file for each projection. This file contains the
projection name, the filters, mappers, and validation events encountered
while building the model.
This plugin is invoked regardless of whether or not the model contains error or unsuppressed validation events.
This plugin is only invoked if the projection and original model are configured on the provided PluginContext.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(PluginContext context) Executes the plugin, creating any number of artifacts.getName()
Gets the name of the plugin.boolean
Plugins can choose whether or not to create artifacts based on whether or not the projection encountered error or unsuppressed danger events.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.smithy.build.SmithyBuildPlugin
isSerial
-
Field Details
-
BUILD_INFO_PATH
- See Also:
-
-
Constructor Details
-
BuildInfoPlugin
public BuildInfoPlugin()
-
-
Method Details
-
getName
Description copied from interface:SmithyBuildPlugin
Gets the name of the plugin.- Specified by:
getName
in interfaceSmithyBuildPlugin
- Returns:
- Returns the name (e.g., "MyPlugin").
-
requiresValidModel
public boolean requiresValidModel()Description copied from interface:SmithyBuildPlugin
Plugins can choose whether or not to create artifacts based on whether or not the projection encountered error or unsuppressed danger events.By default plugins require that there are no errors or danger events for a given projected model.
- Specified by:
requiresValidModel
in interfaceSmithyBuildPlugin
- Returns:
- Returns true if the plugin should only be called if there are no error or unsuppressed danger violations for the projection.
-
execute
Description copied from interface:SmithyBuildPlugin
Executes the plugin, creating any number of artifacts.- Specified by:
execute
in interfaceSmithyBuildPlugin
- Parameters:
context
- Plugin context for build execution.
-