com.sun.enterprise.build
Class RunMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.sun.enterprise.build.DistributionAssemblyMojo
          extended by com.sun.enterprise.build.RunMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class RunMojo
extends DistributionAssemblyMojo

Executes Glassfish by the current module (and all the other modules needed for a particular distribution of GF.)

Author:
Kohsuke Kawaguchi

Nested Class Summary
protected static interface AbstractGlassfishMojo.ArtifactFilter
           
 
Field Summary
protected  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
           
protected  org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
           
protected  org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
           
protected  ArtifactInfo distribution
          Distribution of Glassfish to be used as a basis.
protected  ArtifactInfo[] distributions
          Same as <distribution> but allows you to specify multiple values.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
           
protected  org.apache.maven.project.MavenProject project
          The maven project.
protected  org.apache.maven.project.MavenProjectBuilder projectBuilder
           
 
Fields inherited from class com.sun.enterprise.build.DistributionAssemblyMojo
finalName, outputDirectory
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
RunMojo()
           
 
Method Summary
protected  com.sun.enterprise.module.ModulesRegistry createModuleRegistry(List<org.apache.maven.project.MavenProject> groups)
          Creates a fully configured module registry.
 void execute()
           
protected  Set<org.apache.maven.artifact.Artifact> findArtifacts(Set<org.apache.maven.artifact.Artifact> artifacts, AbstractGlassfishMojo.ArtifactFilter filter)
          Finds artifacts that match the given filter.
protected  Set<org.apache.maven.artifact.Artifact> findArtifactsOfScope(Set<org.apache.maven.artifact.Artifact> artifacts, String scope)
           
protected  Set<org.apache.maven.artifact.Artifact> findArtifactsOfType(Set<org.apache.maven.artifact.Artifact> artifacts, String type)
          Returns a set of Artifacts that have the given type.
protected  boolean isModule(org.apache.maven.artifact.Artifact a)
           
protected  org.apache.maven.project.MavenProject loadPom(org.apache.maven.artifact.Artifact artifact)
          Resolves the POM of the given artifact and parses it into MavenProject.
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

distribution

protected ArtifactInfo distribution
Distribution of Glassfish to be used as a basis. Either this or <distributions> is required.


distributions

protected ArtifactInfo[] distributions
Same as <distribution> but allows you to specify multiple values.


artifactResolver

protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver

artifactFactory

protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory

projectBuilder

protected org.apache.maven.project.MavenProjectBuilder projectBuilder

artifactMetadataSource

protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource

localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository

project

protected org.apache.maven.project.MavenProject project
The maven project.

Constructor Detail

RunMojo

public RunMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class DistributionAssemblyMojo
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

createModuleRegistry

protected com.sun.enterprise.module.ModulesRegistry createModuleRegistry(List<org.apache.maven.project.MavenProject> groups)
                                                                  throws IOException
Creates a fully configured module registry.

Throws:
IOException

isModule

protected boolean isModule(org.apache.maven.artifact.Artifact a)
                    throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

loadPom

protected org.apache.maven.project.MavenProject loadPom(org.apache.maven.artifact.Artifact artifact)
                                                 throws org.apache.maven.project.ProjectBuildingException
Resolves the POM of the given artifact and parses it into MavenProject.

Throws:
org.apache.maven.project.ProjectBuildingException

findArtifacts

protected Set<org.apache.maven.artifact.Artifact> findArtifacts(Set<org.apache.maven.artifact.Artifact> artifacts,
                                                                AbstractGlassfishMojo.ArtifactFilter filter)
Finds artifacts that match the given filter.


findArtifactsOfType

protected Set<org.apache.maven.artifact.Artifact> findArtifactsOfType(Set<org.apache.maven.artifact.Artifact> artifacts,
                                                                      String type)
Returns a set of Artifacts that have the given type.


findArtifactsOfScope

protected Set<org.apache.maven.artifact.Artifact> findArtifactsOfScope(Set<org.apache.maven.artifact.Artifact> artifacts,
                                                                       String scope)


Copyright © 2011 GlassFish Community. All Rights Reserved.