Class SourceRootRegistrar

java.lang.Object
io.github.ascopes.protobufmavenplugin.generation.SourceRootRegistrar

public final class SourceRootRegistrar extends Object
Strategy for registration of sources with the Maven project.

This cannot be extended outside the predefined strategies that already exist in this class.

Author:
Ashley Scopes
  • Field Details

    • MAIN

      public static final SourceRootRegistrar MAIN
    • TEST

      public static final SourceRootRegistrar TEST
    • log

      private static final org.slf4j.Logger log
    • name

      private final String name
    • sourceRootRegistrar

      private final BiConsumer<org.apache.maven.project.MavenProject, String> sourceRootRegistrar
    • classOutputDirectoryGetter

      private final Function<org.apache.maven.model.Build, String> classOutputDirectoryGetter
  • Constructor Details

    • SourceRootRegistrar

      private SourceRootRegistrar(String name, BiConsumer<org.apache.maven.project.MavenProject, String> sourceRootRegistrar, Function<org.apache.maven.model.Build, String> classOutputDirectoryGetter)
  • Method Details

    • registerSourceRoot

      public void registerSourceRoot(org.apache.maven.execution.MavenSession session, Path path)
    • embedListing

      public void embedListing(org.apache.maven.execution.MavenSession session, SourceListing listing) throws IOException
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object