Class JavaSourceUsingMaven

java.lang.Object
io.github.mmm.code.base.BasePathElementAccess
io.github.mmm.code.base.node.BaseNodeItemContainerAccess
io.github.mmm.code.base.AbstractBaseProvider
io.github.mmm.code.base.source.BaseSourceImpl
io.github.mmm.code.impl.java.source.maven.JavaSourceUsingMaven
All Implemented Interfaces:
io.github.mmm.code.api.CodeLoader, io.github.mmm.code.api.CodeProvider, io.github.mmm.code.api.CodeWithContext, io.github.mmm.code.api.node.CodeContainer, io.github.mmm.code.api.node.CodeNode, io.github.mmm.code.api.node.CodeNodeWithFileWriting, io.github.mmm.code.api.object.CodeMutable, io.github.mmm.code.api.source.CodeSource, io.github.mmm.code.base.BaseProvider, io.github.mmm.code.base.loader.BaseLoader, io.github.mmm.code.base.source.BaseSource, io.github.mmm.code.java.maven.api.MavenConstants, AutoCloseable

public class JavaSourceUsingMaven extends io.github.mmm.code.base.source.BaseSourceImpl implements io.github.mmm.code.java.maven.api.MavenConstants
Extends BaseSourceImpl to provide dependencies and descriptor from maven POMs.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Field Summary

    Fields inherited from interface io.github.mmm.code.java.maven.api.MavenConstants

    CLASSIFIER_SOURCES, CONFIG_FOLDER, DEFAULT_BUILD_DIRECTORY, DEFAULT_OUTPUT_DIRECTORY, DEFAULT_OUTPUT_FOLDER, DEFAULT_SOURCE_DIRECTORY, DEFAULT_TEST_OUTPUT_DIRECTORY, DEFAULT_TEST_OUTPUT_FOLDER, DEFAULT_TEST_SOURCE_DIRECTORY, POM_EXTENSION, POM_XML, PROJECT_ARTIFACT_ID, PROJECT_GROUP_ID, PROJECT_VERSION, REPOSITORY_FOLDER, SCOPE_COMPILE, SCOPE_IMPORT, SCOPE_PROVIDED, SCOPE_RUNTIME, SCOPE_TEST, SETTINGS_XML, TYPE_JAR, TYPE_POM
  • Constructor Summary

    Constructors
    Constructor
    Description
    JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, io.github.mmm.code.base.source.BaseSource compileDependency, File byteCodeLocation, File sourceCodeLocation, Supplier<org.apache.maven.model.Model> modelSupplier, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader)
    The constructor for test-source (e.g
    JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, File byteCodeLocation, File sourceCodeLocation, Supplier<org.apache.maven.model.Model> modelSupplier, String scope, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader)
    The constructor.
    JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, String id, JavaSourceUsingMaven compileDependency, JavaSourceUsingMaven testDependency, Supplier<org.apache.maven.model.Model> modelSupplier, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader, boolean immutable)
    The constructor for a local maven project.
    JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, CodeSource reflectiveObject, File byteCodeLocation, File sourceCodeLocation, Supplier<org.apache.maven.model.Model> modelSupplier, String scope, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader)
    The constructor.
    JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, CodeSource reflectiveObject, Supplier<org.apache.maven.model.Model> modelSupplier, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader)
    The constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected io.github.mmm.code.base.source.BaseSourceDependencies
     
    protected io.github.mmm.code.api.source.CodeSourceDescriptor
     
    protected File
     
    io.github.mmm.code.base.BaseContext
     
    org.apache.maven.model.Model
     
     

    Methods inherited from class io.github.mmm.code.base.source.BaseSourceImpl

    close, getByteCodeLocation, getDependencies, getDescriptor, getId, getLoader, getNormalizedId, getNormalizedId, getParent, getReflectiveObject, getRootPackage, getSourceCodeLocation, getType, getType, getType, isImmutable, normalizeId, setContext, toString, write, write

    Methods inherited from class io.github.mmm.code.base.AbstractBaseProvider

    getRequiredType

    Methods inherited from class io.github.mmm.code.base.node.BaseNodeItemContainerAccess

    addContainerItem

    Methods inherited from class io.github.mmm.code.base.BasePathElementAccess

    addPathElementInternal, getPackage

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.github.mmm.code.base.BaseProvider

    getRequiredType

    Methods inherited from interface io.github.mmm.code.base.source.BaseSource

    getSource

    Methods inherited from interface io.github.mmm.code.api.object.CodeMutable

    isMutable

    Methods inherited from interface io.github.mmm.code.api.CodeProvider

    parseName
  • Constructor Details

    • JavaSourceUsingMaven

      public JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, CodeSource reflectiveObject, Supplier<org.apache.maven.model.Model> modelSupplier, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader)
      The constructor.
      Parameters:
      sourceProvider - the maven source provider required for lazy fabrication of dependencies.
      reflectiveObject - the reflective object. May not be null.
      modelSupplier - the Supplier for the maven Model.
      sourceLoader - the BaseSourceLoader.
    • JavaSourceUsingMaven

      public JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, io.github.mmm.code.base.source.BaseSource compileDependency, File byteCodeLocation, File sourceCodeLocation, Supplier<org.apache.maven.model.Model> modelSupplier, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader)
      The constructor for test-source (e.g. "src/test/java").
      Parameters:
      sourceProvider - the maven source provider required for lazy fabrication of dependencies.
      compileDependency - the BaseSource for the compile dependencies (representing src/main/java with compile dependencies as dependencies.
      byteCodeLocation - the byte code location.
      sourceCodeLocation - the source code location.
      modelSupplier - the Supplier for the maven Model.
      sourceLoader - the BaseSourceLoader.
    • JavaSourceUsingMaven

      public JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, File byteCodeLocation, File sourceCodeLocation, Supplier<org.apache.maven.model.Model> modelSupplier, String scope, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader)
      The constructor.
      Parameters:
      sourceProvider - the maven source provider required for lazy fabrication of dependencies.
      byteCodeLocation - the byte code location.
      sourceCodeLocation - the source code location.
      modelSupplier - the Supplier for the maven Model.
      scope - the scope.
      sourceLoader - the BaseSourceLoader.
    • JavaSourceUsingMaven

      public JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, CodeSource reflectiveObject, File byteCodeLocation, File sourceCodeLocation, Supplier<org.apache.maven.model.Model> modelSupplier, String scope, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader)
      The constructor.
      Parameters:
      sourceProvider - the maven source provider required for lazy fabrication of dependencies.
      reflectiveObject - the reflective object. May be null.
      byteCodeLocation - the byte code location.
      sourceCodeLocation - the source code location.
      modelSupplier - the Supplier for the maven Model.
      scope - the scope.
      sourceLoader - the BaseSourceLoader.
    • JavaSourceUsingMaven

      public JavaSourceUsingMaven(JavaSourceProviderUsingMaven sourceProvider, String id, JavaSourceUsingMaven compileDependency, JavaSourceUsingMaven testDependency, Supplier<org.apache.maven.model.Model> modelSupplier, io.github.mmm.code.base.loader.BaseSourceLoader sourceLoader, boolean immutable)
      The constructor for a local maven project.
      Parameters:
      sourceProvider - the maven source provider required for lazy fabrication of dependencies.
      id - the ID.
      compileDependency - the compile dependency.
      testDependency - the test dependency
      modelSupplier - the Supplier for the maven Model.
      sourceLoader - the BaseSourceLoader.
      immutable - the immutable flag.
      See Also:
  • Method Details

    • getContext

      public io.github.mmm.code.base.BaseContext getContext()
      Specified by:
      getContext in interface io.github.mmm.code.base.loader.BaseLoader
      Specified by:
      getContext in interface io.github.mmm.code.base.BaseProvider
      Specified by:
      getContext in interface io.github.mmm.code.base.source.BaseSource
      Specified by:
      getContext in interface io.github.mmm.code.api.CodeWithContext
      Overrides:
      getContext in class io.github.mmm.code.base.source.BaseSourceImpl
    • getModel

      public org.apache.maven.model.Model getModel()
      Returns:
      the maven Model.
    • getScope

      public String getScope()
      Returns:
      the optional scope. May be null.
    • createDescriptor

      protected io.github.mmm.code.api.source.CodeSourceDescriptor createDescriptor()
      Overrides:
      createDescriptor in class io.github.mmm.code.base.source.BaseSourceImpl
    • createDependencies

      protected io.github.mmm.code.base.source.BaseSourceDependencies createDependencies()
      Overrides:
      createDependencies in class io.github.mmm.code.base.source.BaseSourceImpl
    • createSourceCodeLocation

      protected File createSourceCodeLocation()
      Overrides:
      createSourceCodeLocation in class io.github.mmm.code.base.source.BaseSourceImpl