Class JavaSourceProviderUsingMaven

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

public class JavaSourceProviderUsingMaven extends BaseSourceProviderImpl implements 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(MavenBridge mavenBridge)
      The constructor.
      Parameters:
      mavenBridge - the MavenBridge instance to use.
  • Method Details

    • create

      public BaseSource create(CodeSource source)
      Specified by:
      create in interface BaseSourceProvider
    • create

      public BaseSource create(File byteCodeLocation, File sourceCodeLocation)
      Specified by:
      create in interface 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.