Class JavaSourceProviderUsingMaven

java.lang.Object
io.github.mmm.code.base.source.BaseSourceProviderImpl
io.github.mmm.code.impl.java.source.maven.JavaSourceProviderUsingMaven
All Implemented Interfaces:
io.github.mmm.code.base.source.BaseSourceProvider, io.github.mmm.code.java.maven.api.MavenConstants

public class JavaSourceProviderUsingMaven extends io.github.mmm.code.base.source.BaseSourceProviderImpl implements io.github.mmm.code.java.maven.api.MavenConstants
Implementation of BaseSourceProvider using maven to read and extract metadata from POMs.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Constructor Details

    • JavaSourceProviderUsingMaven

      public JavaSourceProviderUsingMaven()
      The constructor.
    • JavaSourceProviderUsingMaven

      public JavaSourceProviderUsingMaven(io.github.mmm.code.java.maven.api.MavenBridge mavenBridge)
      The constructor.
      Parameters:
      mavenBridge - the MavenBridge instance to use.
  • Method Details

    • create

      public io.github.mmm.code.base.source.BaseSource create(CodeSource source)
      Specified by:
      create in interface io.github.mmm.code.base.source.BaseSourceProvider
    • create

      public io.github.mmm.code.base.source.BaseSource create(File byteCodeLocation, File sourceCodeLocation)
      Specified by:
      create in interface io.github.mmm.code.base.source.BaseSourceProvider
    • createFromLocalMavenProject

      public static JavaContext createFromLocalMavenProject()
      Returns:
      the JavaContext for the local Maven project in the current working directory.
    • createFromLocalMavenProject

      public static JavaContext createFromLocalMavenProject(File location)
      Parameters:
      location - the File pointing to the Maven project.
      Returns:
      the JavaContext for the Maven project at the given location.
    • createFromLocalMavenProject

      public static JavaContext createFromLocalMavenProject(File location, boolean buildClassLoader)
      Parameters:
      location - the File pointing to the Maven project.
      buildClassLoader - - true to build a custom ClassLoader for the maven project, false to use the existing CCL.
      Returns:
      the JavaContext for the Maven project at the given location.
    • createFromLocalMavenProject

      public static JavaContext createFromLocalMavenProject(File location, MavenDependencyCollector dependencyCollector)
      Parameters:
      location - the File pointing to the Maven project.
      dependencyCollector - the MavenDependencyCollector used to build the classpath.
      Returns:
      the JavaContext for the Maven project at the given location.