org.codehaus.mojo.rmic
Class AbstractRmiMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.rmic.AbstractRmiMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, RmicConfig
Direct Known Subclasses:
RmicMojo, TestRmicMojo

public abstract class AbstractRmiMojo
extends org.apache.maven.plugin.AbstractMojo
implements RmicConfig

Generic super class of rmi compiler mojos.

Version:
$Id: AbstractRmiMojo.java 8127 2008-11-21 19:05:31Z pgier $
Author:
Trygve Laugstøl

Field Summary
protected  String compilerId
          The id of the rmi compiler to use.
protected  Set excludes
          A list of exclusions when searching for classes to compile.
protected  Set includes
          A list of inclusions when searching for classes to compile.
protected  org.apache.maven.project.MavenProject project
          The maven project.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractRmiMojo()
           
 
Method Summary
 void execute()
          Main mojo execution.
protected  List generateUrlCompileClasspath()
          Returns a list of URL objects that represent the classpath elements.
abstract  File getClassesDirectory()
          Get the directory where Remote impl classes are located.
 String getCompilerId()
           
abstract  File getOutputDirectory()
          Get the directory where rmic generated class files are written.
abstract  List getProjectClasspathElements()
          Get the list of elements to add to the classpath of rmic
 List getRmicClasspathElements()
          Get the list of elements to add to the classpath of rmic
 String getVersion()
           
 boolean isIdl()
           
 boolean isIiop()
           
 boolean isKeep()
          Keep intermediate files
 boolean isNoLocalStubs()
          Do not create stubs optimized for same process.
 boolean isNoValueMethods()
          Do not create methods for valuetypes.
 boolean isNowarn()
          Turn off warnings
 boolean isVerbose()
          Output messages about compilation
 List scanForRemoteClasses()
          Search the input directory for classes to compile.
 
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

includes

protected Set includes
A list of inclusions when searching for classes to compile.


excludes

protected Set excludes
A list of exclusions when searching for classes to compile.


compilerId

protected String compilerId
The id of the rmi compiler to use.


project

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

Constructor Detail

AbstractRmiMojo

public AbstractRmiMojo()
Method Detail

getProjectClasspathElements

public abstract List getProjectClasspathElements()
Get the list of elements to add to the classpath of rmic

Returns:
list of classpath elements

getOutputDirectory

public abstract File getOutputDirectory()
Get the directory where rmic generated class files are written.

Specified by:
getOutputDirectory in interface RmicConfig
Returns:
the directory

getClassesDirectory

public abstract File getClassesDirectory()
Get the directory where Remote impl classes are located.

Returns:
path to compiled classes

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Main mojo execution.

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Throws:
org.apache.maven.plugin.MojoExecutionException - if there is a problem executing the mojo.

getRmicClasspathElements

public List getRmicClasspathElements()
Get the list of elements to add to the classpath of rmic

Specified by:
getRmicClasspathElements in interface RmicConfig
Returns:
list of classpath elements

scanForRemoteClasses

public List scanForRemoteClasses()
Search the input directory for classes to compile.

Returns:
a list of class names to rmic

generateUrlCompileClasspath

protected List generateUrlCompileClasspath()
                                    throws org.apache.maven.plugin.MojoExecutionException
Returns a list of URL objects that represent the classpath elements. This is useful for using a URLClassLoader

Returns:
list of url classpath elements
Throws:
org.apache.maven.plugin.MojoExecutionException

getCompilerId

public String getCompilerId()

isIiop

public boolean isIiop()
Specified by:
isIiop in interface RmicConfig
Returns:
Whether iiop stubs should be generated

isIdl

public boolean isIdl()
Specified by:
isIdl in interface RmicConfig
Returns:
Create IDL

isKeep

public boolean isKeep()
Description copied from interface: RmicConfig
Keep intermediate files

Specified by:
isKeep in interface RmicConfig
Returns:
true or false

getVersion

public String getVersion()
Specified by:
getVersion in interface RmicConfig
Returns:
The version of the compiler to use

isNowarn

public boolean isNowarn()
Description copied from interface: RmicConfig
Turn off warnings

Specified by:
isNowarn in interface RmicConfig
Returns:
true or false

isVerbose

public boolean isVerbose()
Description copied from interface: RmicConfig
Output messages about compilation

Specified by:
isVerbose in interface RmicConfig
Returns:
true or false

isNoLocalStubs

public boolean isNoLocalStubs()
Description copied from interface: RmicConfig
Do not create stubs optimized for same process.

Specified by:
isNoLocalStubs in interface RmicConfig
Returns:
true or false

isNoValueMethods

public boolean isNoValueMethods()
Description copied from interface: RmicConfig
Do not create methods for valuetypes.

Specified by:
isNoValueMethods in interface RmicConfig
Returns:
true or false


Copyright © 2006-2011 Codehaus. All Rights Reserved.