public class SimpleMavenProject extends Object
| Modifier and Type | Field and Description |
|---|---|
org.codehaus.plexus.DefaultPlexusContainer |
container
The initialized Maven component container - Plexus Dependency Injection object
|
org.apache.maven.project.MavenProject |
project
The initialized Maven project object
|
String |
projectRoot
The absolute file path of the project root as passed to the constructor
|
org.eclipse.aether.DefaultRepositorySystemSession |
session
The initialized Maven session
|
| Constructor and Description |
|---|
SimpleMavenProject(String projectRoot)
Instantiates a new Simple maven project.
|
| Modifier and Type | Method and Description |
|---|---|
static HashMap<String,org.eclipse.jdt.core.dom.CompilationUnit> |
loadProject()
Load project hash map.
|
static HashMap<String,org.eclipse.jdt.core.dom.CompilationUnit> |
loadProject(String root)
Load project hash map.
|
static void |
main(String[] args)
A sample CLI application which loads a maven java project and prints out the parse tree.
|
HashMap<String,org.eclipse.jdt.core.dom.CompilationUnit> |
parse()
Parses all files in the project.
|
org.apache.maven.project.DependencyResolutionResult |
resolve()
Resolves Maven dependencies
|
public final org.codehaus.plexus.DefaultPlexusContainer container
public final org.eclipse.aether.DefaultRepositorySystemSession session
public final org.apache.maven.project.MavenProject project
public final String projectRoot
public SimpleMavenProject(String projectRoot) throws IOException, org.codehaus.plexus.PlexusContainerException, org.codehaus.plexus.component.repository.exception.ComponentLookupException, org.apache.maven.project.ProjectBuildingException
projectRoot - the project rootIOException - the io exceptionorg.codehaus.plexus.PlexusContainerException - the plexus container exceptionorg.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionorg.apache.maven.project.ProjectBuildingException - the project building exceptionpublic static void main(String[] args) throws Exception
args - the input argumentsException - the exceptionpublic static HashMap<String,org.eclipse.jdt.core.dom.CompilationUnit> loadProject() throws IOException, org.codehaus.plexus.PlexusContainerException, org.codehaus.plexus.component.repository.exception.ComponentLookupException, org.apache.maven.project.ProjectBuildingException, org.apache.maven.project.DependencyResolutionException
IOException - the io exceptionorg.codehaus.plexus.PlexusContainerException - the plexus container exceptionorg.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionorg.apache.maven.project.ProjectBuildingException - the project building exceptionorg.apache.maven.project.DependencyResolutionException - the dependency resolution exceptionpublic static HashMap<String,org.eclipse.jdt.core.dom.CompilationUnit> loadProject(String root) throws IOException, org.codehaus.plexus.PlexusContainerException, org.codehaus.plexus.component.repository.exception.ComponentLookupException, org.apache.maven.project.ProjectBuildingException, org.apache.maven.project.DependencyResolutionException
root - the rootIOException - the io exceptionorg.codehaus.plexus.PlexusContainerException - the plexus container exceptionorg.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionorg.apache.maven.project.ProjectBuildingException - the project building exceptionorg.apache.maven.project.DependencyResolutionException - the dependency resolution exceptionpublic final HashMap<String,org.eclipse.jdt.core.dom.CompilationUnit> parse() throws org.codehaus.plexus.component.repository.exception.ComponentLookupException, org.apache.maven.project.DependencyResolutionException
org.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionorg.apache.maven.project.DependencyResolutionException - the dependency resolution exceptionpublic org.apache.maven.project.DependencyResolutionResult resolve()
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException,
org.apache.maven.project.DependencyResolutionException
org.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionorg.apache.maven.project.DependencyResolutionException - the dependency resolution exceptionCopyright © 2018 SimiaCryptus Software. All rights reserved.