org.kie.scanner.embedder
Class MavenEmbedder
java.lang.Object
org.kie.scanner.embedder.MavenEmbedder
public class MavenEmbedder
- extends Object
|
Method Summary |
protected org.apache.maven.execution.MavenExecutionRequest |
buildMavenExecutionRequest(MavenRequest mavenRequest)
|
List<org.apache.maven.project.ProjectBuildingResult> |
buildProjects(File mavenProject,
boolean recursive)
|
List<org.apache.maven.project.MavenProject> |
collectProjects(File basedir,
String[] includes,
String[] excludes)
|
org.apache.maven.artifact.Artifact |
createArtifact(String groupId,
String artifactId,
String version,
String scope,
String type)
|
org.apache.maven.artifact.Artifact |
createArtifactWithClassifier(String groupId,
String artifactId,
String version,
String type,
String classifier)
|
org.apache.maven.artifact.repository.ArtifactRepository |
createLocalRepository(File localRepository)
|
org.apache.maven.artifact.repository.ArtifactRepository |
createLocalRepository(org.apache.maven.settings.Settings settings)
|
org.apache.maven.artifact.repository.ArtifactRepository |
createLocalRepository(String url,
String repositoryId)
|
org.apache.maven.artifact.repository.ArtifactRepository |
createRepository(String url,
String repositoryId)
|
org.apache.maven.execution.MavenExecutionResult |
execute(MavenRequest mavenRequest)
|
org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository()
|
String |
getLocalRepositoryPath()
|
MavenRequest |
getMavenRequest()
|
org.codehaus.plexus.PlexusContainer |
getPlexusContainer()
|
org.apache.maven.settings.Settings |
getSettings()
|
|
lookup(Class<T> clazz)
|
|
lookup(Class<T> clazz,
String hint)
|
Object |
lookup(String role)
|
Object |
lookup(String role,
String hint)
|
org.apache.maven.model.Model |
readModel(File model)
|
org.apache.maven.project.MavenProject |
readProject(File mavenProject)
|
org.apache.maven.project.MavenProject |
readProject(InputStream mavenProjectStream)
|
List<org.apache.maven.project.MavenProject> |
readProjects(File mavenProject,
boolean recursive)
|
void |
resolve(org.apache.maven.artifact.Artifact artifact,
List remoteRepositories,
org.apache.maven.artifact.repository.ArtifactRepository localRepository)
|
void |
writeModel(Writer writer,
org.apache.maven.model.Model model)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
userHome
public static final String userHome
userMavenConfigurationHome
public static final File userMavenConfigurationHome
DEFAULT_USER_SETTINGS_FILE
public static final File DEFAULT_USER_SETTINGS_FILE
DEFAULT_GLOBAL_SETTINGS_FILE
public static final File DEFAULT_GLOBAL_SETTINGS_FILE
DEFAULT_LOCAL_REPO_ID
public static final String DEFAULT_LOCAL_REPO_ID
- See Also:
- Constant Field Values
DEFAULT_LAYOUT_ID
public static final String DEFAULT_LAYOUT_ID
- See Also:
- Constant Field Values
MavenEmbedder
public MavenEmbedder(File mavenHome,
MavenRequest mavenRequest)
throws MavenEmbedderException
- Throws:
MavenEmbedderException
MavenEmbedder
public MavenEmbedder(ClassLoader mavenClassLoader,
ClassLoader parent,
MavenRequest mavenRequest)
throws MavenEmbedderException
- Throws:
MavenEmbedderException
MavenEmbedder
public MavenEmbedder(ClassLoader mavenClassLoader,
MavenRequest mavenRequest)
throws MavenEmbedderException
- Throws:
MavenEmbedderException
getPlexusContainer
public org.codehaus.plexus.PlexusContainer getPlexusContainer()
buildMavenExecutionRequest
protected org.apache.maven.execution.MavenExecutionRequest buildMavenExecutionRequest(MavenRequest mavenRequest)
throws MavenEmbedderException,
org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
MavenEmbedderException
org.codehaus.plexus.component.repository.exception.ComponentLookupException
getSettings
public org.apache.maven.settings.Settings getSettings()
throws MavenEmbedderException,
org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
MavenEmbedderException
org.codehaus.plexus.component.repository.exception.ComponentLookupException
getLocalRepository
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
getLocalRepositoryPath
public String getLocalRepositoryPath()
readModel
public org.apache.maven.model.Model readModel(File model)
throws org.codehaus.plexus.util.xml.pull.XmlPullParserException,
FileNotFoundException,
IOException
- Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException
FileNotFoundException
IOException
writeModel
public void writeModel(Writer writer,
org.apache.maven.model.Model model)
throws IOException
- Throws:
IOException
readProject
public org.apache.maven.project.MavenProject readProject(InputStream mavenProjectStream)
throws org.apache.maven.project.ProjectBuildingException,
MavenEmbedderException
- Throws:
org.apache.maven.project.ProjectBuildingException
MavenEmbedderException
readProject
public org.apache.maven.project.MavenProject readProject(File mavenProject)
throws org.apache.maven.project.ProjectBuildingException,
MavenEmbedderException
- Throws:
org.apache.maven.project.ProjectBuildingException
MavenEmbedderException
readProjects
public List<org.apache.maven.project.MavenProject> readProjects(File mavenProject,
boolean recursive)
throws org.apache.maven.project.ProjectBuildingException,
MavenEmbedderException
- Throws:
org.apache.maven.project.ProjectBuildingException
MavenEmbedderException
buildProjects
public List<org.apache.maven.project.ProjectBuildingResult> buildProjects(File mavenProject,
boolean recursive)
throws org.apache.maven.project.ProjectBuildingException,
MavenEmbedderException
- Throws:
org.apache.maven.project.ProjectBuildingException
MavenEmbedderException
collectProjects
public List<org.apache.maven.project.MavenProject> collectProjects(File basedir,
String[] includes,
String[] excludes)
throws org.apache.maven.plugin.MojoExecutionException,
MavenEmbedderException
- Throws:
org.apache.maven.plugin.MojoExecutionException
MavenEmbedderException
createArtifact
public org.apache.maven.artifact.Artifact createArtifact(String groupId,
String artifactId,
String version,
String scope,
String type)
throws MavenEmbedderException
- Throws:
MavenEmbedderException
createArtifactWithClassifier
public org.apache.maven.artifact.Artifact createArtifactWithClassifier(String groupId,
String artifactId,
String version,
String type,
String classifier)
throws MavenEmbedderException
- Throws:
MavenEmbedderException
resolve
public void resolve(org.apache.maven.artifact.Artifact artifact,
List remoteRepositories,
org.apache.maven.artifact.repository.ArtifactRepository localRepository)
throws org.apache.maven.artifact.resolver.ArtifactResolutionException,
org.apache.maven.artifact.resolver.ArtifactNotFoundException
- Throws:
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.artifact.resolver.ArtifactNotFoundException
execute
public org.apache.maven.execution.MavenExecutionResult execute(MavenRequest mavenRequest)
throws MavenEmbedderException
- Throws:
MavenEmbedderException
createLocalRepository
public org.apache.maven.artifact.repository.ArtifactRepository createLocalRepository(File localRepository)
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
createLocalRepository
public org.apache.maven.artifact.repository.ArtifactRepository createLocalRepository(org.apache.maven.settings.Settings settings)
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
createLocalRepository
public org.apache.maven.artifact.repository.ArtifactRepository createLocalRepository(String url,
String repositoryId)
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
createRepository
public org.apache.maven.artifact.repository.ArtifactRepository createRepository(String url,
String repositoryId)
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
lookup
public <T> T lookup(Class<T> clazz)
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
lookup
public <T> T lookup(Class<T> clazz,
String hint)
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
lookup
public Object lookup(String role,
String hint)
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
lookup
public Object lookup(String role)
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
getMavenRequest
public MavenRequest getMavenRequest()
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.