Class ProtobufBuildOrchestrator
java.lang.Object
io.github.ascopes.protobufmavenplugin.generation.ProtobufBuildOrchestrator
@Description("Orchestrator for the entire generation process, gluing all components together")
@Named
public final class ProtobufBuildOrchestrator
extends Object
Orchestrates all moving parts in this plugin, collecting all relevant information and
dependencies to pass to an invocation of
protoc
.
Orchestrates all other components.
- Author:
- Ashley Scopes
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CommandLineExecutor
private final IncrementalCacheManager
private static final org.slf4j.Logger
private final org.apache.maven.execution.MavenSession
private final ProjectInputResolver
private final ProjectPluginResolver
private final ProtocResolver
-
Constructor Summary
ConstructorsConstructorDescriptionProtobufBuildOrchestrator
(org.apache.maven.execution.MavenSession mavenSession, ProtocResolver protocResolver, ProjectInputResolver projectInputResolver, ProjectPluginResolver projectPluginResolver, IncrementalCacheManager incrementalCacheManager, CommandLineExecutor commandLineExecutor) -
Method Summary
Modifier and TypeMethodDescriptionprivate Collection
<Path> computeActualSourcesToCompile
(GenerationRequest request, ProjectInputListing projectInputs) private void
createOutputDirectories
(GenerationRequest request) private Path
discoverProtocPath
(GenerationRequest request) private void
embedSourcesInClassOutputs
(SourceRootRegistrar registrar, Collection<SourceListing> listings) generate
(GenerationRequest request) private GenerationResult
handleMissingInputs
(GenerationRequest request) private GenerationResult
handleMissingTargets
(GenerationRequest request) private void
registerSourceRoots
(GenerationRequest request) private boolean
-
Field Details
-
log
private static final org.slf4j.Logger log -
mavenSession
private final org.apache.maven.execution.MavenSession mavenSession -
protocResolver
-
projectInputResolver
-
projectPluginResolver
-
incrementalCacheManager
-
commandLineExecutor
-
-
Constructor Details
-
ProtobufBuildOrchestrator
@Inject public ProtobufBuildOrchestrator(org.apache.maven.execution.MavenSession mavenSession, ProtocResolver protocResolver, ProjectInputResolver projectInputResolver, ProjectPluginResolver projectPluginResolver, IncrementalCacheManager incrementalCacheManager, CommandLineExecutor commandLineExecutor)
-
-
Method Details
-
generate
- Throws:
ResolutionException
IOException
-
handleMissingInputs
-
handleMissingTargets
-
discoverProtocPath
- Throws:
ResolutionException
-
createOutputDirectories
- Throws:
IOException
-
registerSourceRoots
-
computeActualSourcesToCompile
private Collection<Path> computeActualSourcesToCompile(GenerationRequest request, ProjectInputListing projectInputs) throws IOException - Throws:
IOException
-
shouldIncrementallyCompile
-
embedSourcesInClassOutputs
private void embedSourcesInClassOutputs(SourceRootRegistrar registrar, Collection<SourceListing> listings) throws ResolutionException - Throws:
ResolutionException
-