KIE :: CI 6.2.0.CR1

org.kie.scanner.embedder
Class MavenEmbedder

java.lang.Object
  extended by org.kie.scanner.embedder.MavenEmbedder

public class MavenEmbedder
extends Object


Field Summary
static File DEFAULT_GLOBAL_SETTINGS_FILE
           
static String DEFAULT_LAYOUT_ID
           
static String DEFAULT_LOCAL_REPO_ID
           
 
Constructor Summary
MavenEmbedder(ClassLoader mavenClassLoader, ClassLoader parent, MavenRequest mavenRequest)
           
MavenEmbedder(ClassLoader mavenClassLoader, MavenRequest mavenRequest)
           
MavenEmbedder(File mavenHome, MavenRequest mavenRequest)
           
 
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()
           
<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.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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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
Method Detail

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()

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()

KIE :: CI 6.2.0.CR1

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.