Class SourcesPlugin
- java.lang.Object
-
- software.amazon.smithy.build.plugins.SourcesPlugin
-
- All Implemented Interfaces:
SmithyBuildPlugin
public final class SourcesPlugin extends java.lang.Object implements SmithyBuildPlugin
Copies model sources into the sources plugin.Model sources are model components that were defined in one of the directories marked as "sources" in the original model or a model component that is found in the updated model but not the original model.
When a JAR is provided as a source, the models contained within the JAR are extracted into the sources directory under a directory with the same name as the JAR without the ".jar" extension; the JAR is not copied into the sources directory. For example, given a JAR at "/foo/baz.jar" that contains a "bar.smithy" file, a source will be created named "baz/bar.smithy".
This plugin can only run if an original model is provided.
-
-
Constructor Summary
Constructors Constructor Description SourcesPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(PluginContext context)
Executes the plugin, creating any number of artifacts.java.lang.String
getName()
Gets the name of the plugin.-
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, requiresValidModel
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:SmithyBuildPlugin
Gets the name of the plugin.- Specified by:
getName
in interfaceSmithyBuildPlugin
- Returns:
- Returns the name (e.g., "MyPlugin").
-
execute
public void execute(PluginContext context)
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.
-
-