public class MavenEmbedder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LAYOUT_ID |
static String |
DEFAULT_LOCAL_REPO_ID |
static String |
userHome |
| Constructor and Description |
|---|
MavenEmbedder(ClassLoader mavenClassLoader,
ClassLoader parent,
MavenRequest mavenRequest) |
MavenEmbedder(ClassLoader mavenClassLoader,
MavenRequest mavenRequest) |
MavenEmbedder(File mavenHome,
MavenRequest mavenRequest) |
| Modifier and Type | Method and Description |
|---|---|
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() |
<T> T |
lookup(Class<T> clazz) |
<T> T |
lookup(Class<T> clazz,
String hint) |
Object |
lookup(String role) |
Object |
lookup(String role,
String hint) |
org.apache.maven.model.Model |
readModel(File model)
Deprecated.
not sure if use but definitely doesn't work
|
org.apache.maven.project.MavenProject |
readProject(File mavenProject) |
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)
Deprecated.
not sure if use but definitely doesn't work
|
public static final String userHome
public static final String DEFAULT_LOCAL_REPO_ID
public static final String DEFAULT_LAYOUT_ID
public MavenEmbedder(File mavenHome, MavenRequest mavenRequest) throws MavenEmbedderException
MavenEmbedderExceptionpublic MavenEmbedder(ClassLoader mavenClassLoader, ClassLoader parent, MavenRequest mavenRequest) throws MavenEmbedderException
MavenEmbedderExceptionpublic MavenEmbedder(ClassLoader mavenClassLoader, MavenRequest mavenRequest) throws MavenEmbedderException
MavenEmbedderExceptionpublic org.codehaus.plexus.PlexusContainer getPlexusContainer()
protected org.apache.maven.execution.MavenExecutionRequest buildMavenExecutionRequest(MavenRequest mavenRequest) throws MavenEmbedderException, org.codehaus.plexus.component.repository.exception.ComponentLookupException
MavenEmbedderExceptionorg.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic org.apache.maven.settings.Settings getSettings()
throws MavenEmbedderException,
org.codehaus.plexus.component.repository.exception.ComponentLookupException
MavenEmbedderExceptionorg.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic String getLocalRepositoryPath()
public org.apache.maven.model.Model readModel(File model) throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, FileNotFoundException, IOException
org.codehaus.plexus.util.xml.pull.XmlPullParserExceptionFileNotFoundExceptionIOExceptionpublic void writeModel(Writer writer, org.apache.maven.model.Model model) throws IOException
IOExceptionpublic org.apache.maven.project.MavenProject readProject(File mavenProject) throws org.apache.maven.project.ProjectBuildingException, MavenEmbedderException
org.apache.maven.project.ProjectBuildingExceptionMavenEmbedderExceptionpublic List<org.apache.maven.project.MavenProject> readProjects(File mavenProject, boolean recursive) throws org.apache.maven.project.ProjectBuildingException, MavenEmbedderException
org.apache.maven.project.ProjectBuildingExceptionMavenEmbedderExceptionpublic List<org.apache.maven.project.ProjectBuildingResult> buildProjects(File mavenProject, boolean recursive) throws org.apache.maven.project.ProjectBuildingException, MavenEmbedderException
org.apache.maven.project.ProjectBuildingExceptionMavenEmbedderExceptionpublic List<org.apache.maven.project.MavenProject> collectProjects(File basedir, String[] includes, String[] excludes) throws org.apache.maven.plugin.MojoExecutionException, MavenEmbedderException
org.apache.maven.plugin.MojoExecutionExceptionMavenEmbedderExceptionpublic org.apache.maven.artifact.Artifact createArtifact(String groupId, String artifactId, String version, String scope, String type) throws MavenEmbedderException
MavenEmbedderExceptionpublic org.apache.maven.artifact.Artifact createArtifactWithClassifier(String groupId, String artifactId, String version, String type, String classifier) throws MavenEmbedderException
MavenEmbedderExceptionpublic 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
org.apache.maven.artifact.resolver.ArtifactResolutionExceptionorg.apache.maven.artifact.resolver.ArtifactNotFoundExceptionpublic org.apache.maven.execution.MavenExecutionResult execute(MavenRequest mavenRequest) throws MavenEmbedderException
MavenEmbedderExceptionpublic org.apache.maven.artifact.repository.ArtifactRepository createLocalRepository(File localRepository) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic org.apache.maven.artifact.repository.ArtifactRepository createLocalRepository(org.apache.maven.settings.Settings settings)
throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic org.apache.maven.artifact.repository.ArtifactRepository createLocalRepository(String url, String repositoryId) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic org.apache.maven.artifact.repository.ArtifactRepository createRepository(String url, String repositoryId) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic <T> T lookup(Class<T> clazz) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic <T> T lookup(Class<T> clazz, String hint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic Object lookup(String role, String hint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic Object lookup(String role) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionpublic MavenRequest getMavenRequest()
Copyright © 2004–2019. All rights reserved.