org.codehaus.groovy.maven.plugin.stubgen
Class AbstractGenerateStubsMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.groovy.maven.plugin.MojoSupport
          extended by org.codehaus.groovy.maven.plugin.ProviderMojoSupport
              extended by org.codehaus.groovy.maven.plugin.ComponentMojoSupport
                  extended by org.codehaus.groovy.maven.plugin.CompilerMojoSupport
                      extended by org.codehaus.groovy.maven.plugin.stubgen.AbstractGenerateStubsMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Direct Known Subclasses:
GenerateStubsMojo, GenerateTestStubsMojo

public abstract class AbstractGenerateStubsMojo
extends CompilerMojoSupport

Support for Java stub generation mojos.

Stub generation basically parses Groovy sources, and then creates the bare-minimum Java source equivilent so that the maven-compiler-plugin's compile and testCompile goals can execute and resolve Groovy classes that may be referenced by Java sources.

This is important, since our compile and testCompile goals execute *after* the normal Java compiler does.

Version:
$Id: AbstractGenerateStubsMojo.java 13181 2008-08-10 14:05:55Z user57 $
Author:
Jason Dillon

Field Summary
 
Fields inherited from class org.codehaus.groovy.maven.plugin.CompilerMojoSupport
classpath, compileState, sources
 
Fields inherited from class org.codehaus.groovy.maven.plugin.ProviderMojoSupport
pluginArtifactMap
 
Fields inherited from class org.codehaus.groovy.maven.plugin.MojoSupport
artifactFactory, artifactMetadataSource, artifactRepository, artifactResolver, log, project, remoteRepositories
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
protected AbstractGenerateStubsMojo()
           
 
Method Summary
protected  void compile(StubCompiler compiler, org.apache.maven.shared.model.fileset.FileSet[] sources)
           
protected abstract  void forceCompile(java.io.File file)
           
protected  void process(Component component)
           
 
Methods inherited from class org.codehaus.groovy.maven.plugin.CompilerMojoSupport
addSourceRoot, getDefaultSources, getExcludesFrom, getIncludesFrom, getOutputDirectory, getSourceRoots, getUserClassspathElements, scanForSources, scanForSources
 
Methods inherited from class org.codehaus.groovy.maven.plugin.ComponentMojoSupport
configure, doExecute, feature, feature
 
Methods inherited from class org.codehaus.groovy.maven.plugin.ProviderMojoSupport
contextualize, getProviderManager, getProviderSelection, provider
 
Methods inherited from class org.codehaus.groovy.maven.plugin.MojoSupport
createArtifact, createClassPath, execute, getArtifact, getProjectClasspathElements, resolveArtifact
 
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
 

Constructor Detail

AbstractGenerateStubsMojo

protected AbstractGenerateStubsMojo()
Method Detail

forceCompile

protected abstract void forceCompile(java.io.File file)

process

protected void process(Component component)
                throws java.lang.Exception
Specified by:
process in class ComponentMojoSupport
Throws:
java.lang.Exception

compile

protected void compile(StubCompiler compiler,
                       org.apache.maven.shared.model.fileset.FileSet[] sources)
                throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2006-2009 Codehaus. All Rights Reserved.