net.israfil.mojo.flex2
Class AbstractFlexMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by net.israfil.mojo.flex2.AbstractFlexMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractFlexCompilerMojo, ASDocMojo

public abstract class AbstractFlexMojo
extends org.apache.maven.plugin.AbstractMojo

Base class for flex2/actionscript3 plugin

Version:
$Id: AbstractFlexMojo.java 597 2008-01-14 22:46:31Z christianedwardgruber $
Author:
Christian Edward Gruber, Tim Spurway

Field Summary
protected  java.lang.String classifier
          Classifier to add to the artifact generated.
protected  Parameter[] extraParameters
           
protected  java.lang.String finalName
          Name of the generated compiled binary file.
protected  java.io.File flexConfig
          The location of the flex configuration file.
protected  java.io.File flexHome
          The directory in which Flex (command-line or builder) is installed.
protected  java.lang.String[] javaOpts
          These are additional JVM options used when invoking the Flex compiler
protected  java.io.File outputDirectory
          The directory into which to place the resulting artifact.
protected  java.util.List pluginArtifacts
           
protected  org.apache.maven.project.MavenProject project
          The maven project.
protected  org.apache.maven.project.MavenProjectHelper projectHelper
           
protected  java.io.File source
          Location of the flex sources.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractFlexMojo()
           
 
Method Summary
protected  void addClasspathEntry(java.lang.StringBuffer compilerClasspath, java.lang.String path)
           
 void execute()
           
protected  int executeJavaCommand(java.lang.String cmd, java.lang.String cwd, java.util.List commandLineArgs, java.lang.String className, java.util.List programArgs)
           
protected  void finalizeParameters(java.util.List parameters)
           
protected  java.lang.String getCommandClassPath()
           
protected abstract  java.lang.String getCompilerClass()
           
protected abstract  java.lang.String getExecutableJar()
           
protected  java.io.File getFile(java.io.File basedir, java.lang.String finalName, java.lang.String classifier)
           
protected abstract  java.lang.String getFileExtension()
           
protected abstract  java.io.File getOutputFile()
           
protected  void postProcess()
          Executed near the end of execute().
protected  java.util.List prepareParameters()
          Override and implement this method to take the existing java parameters and add any final information requried to provide source files to the compiler.
 
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

flexHome

protected java.io.File flexHome
The directory in which Flex (command-line or builder) is installed.


flexConfig

protected java.io.File flexConfig
The location of the flex configuration file. Uses the installed default flex-config.xml file if none supplied.


source

protected java.io.File source
Location of the flex sources.


outputDirectory

protected java.io.File outputDirectory
The directory into which to place the resulting artifact. note that this is a read-only parameter, satisfied from the build directory. Attempts to configure this should use the standard <build><directory/></build> approach.


finalName

protected java.lang.String finalName
Name of the generated compiled binary file.


project

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


projectHelper

protected org.apache.maven.project.MavenProjectHelper projectHelper

pluginArtifacts

protected java.util.List pluginArtifacts

javaOpts

protected java.lang.String[] javaOpts
These are additional JVM options used when invoking the Flex compiler


extraParameters

protected Parameter[] extraParameters

classifier

protected java.lang.String classifier
Classifier to add to the artifact generated. If given, the artifact will be an attachment instead.

Constructor Detail

AbstractFlexMojo

public AbstractFlexMojo()
Method Detail

getOutputFile

protected abstract java.io.File getOutputFile()

getCompilerClass

protected abstract java.lang.String getCompilerClass()

getFileExtension

protected abstract java.lang.String getFileExtension()

getFile

protected java.io.File getFile(java.io.File basedir,
                               java.lang.String finalName,
                               java.lang.String classifier)

prepareParameters

protected java.util.List prepareParameters()
                                    throws org.apache.maven.plugin.MojoFailureException,
                                           org.apache.maven.plugin.MojoExecutionException
Override and implement this method to take the existing java parameters and add any final information requried to provide source files to the compiler.

Parameters:
parameterList -
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

finalizeParameters

protected void finalizeParameters(java.util.List parameters)
                           throws org.apache.maven.plugin.MojoExecutionException,
                                  org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getExecutableJar

protected abstract java.lang.String getExecutableJar()

getCommandClassPath

protected java.lang.String getCommandClassPath()
                                        throws org.apache.maven.plugin.MojoExecutionException,
                                               org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

postProcess

protected void postProcess()
Executed near the end of execute().


addClasspathEntry

protected void addClasspathEntry(java.lang.StringBuffer compilerClasspath,
                                 java.lang.String path)

executeJavaCommand

protected int executeJavaCommand(java.lang.String cmd,
                                 java.lang.String cwd,
                                 java.util.List commandLineArgs,
                                 java.lang.String className,
                                 java.util.List programArgs)
                          throws org.codehaus.plexus.util.cli.CommandLineException
Throws:
org.codehaus.plexus.util.cli.CommandLineException


Copyright © 2006-2008 Israfil Consulting Services Corporation Open-Source Projects. All Rights Reserved.