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  java.lang.String compilerId
          The id of the rmi compiler to use.
protected  java.util.Set excludes
          A list of exclusions when searching for classes to compile.
protected  java.util.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  java.util.List generateUrlCompileClasspath()
          Returns a list of URL objects that represent the classpath elements.
abstract  java.io.File getClassesDirectory()
          Get the directory where Remote impl classes are located.
 java.lang.String getCompilerId()
           
abstract  java.io.File getOutputDirectory()
          Get the directory where rmic generated class files are written.
abstract  java.util.List getProjectClasspathElements()
          Get the list of elements to add to the classpath of rmic
 java.util.List getRmicClasspathElements()
          Get the list of elements to add to the classpath of rmic
 java.lang.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
 java.util.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 java.util.Set includes
A list of inclusions when searching for classes to compile.

Is defined by:

excludes

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

Is defined by:

compilerId

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

Is defined by:
default-value:
sun

project

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

Is defined by:
expression:
${project}
Is readonly.
Constructor Detail

AbstractRmiMojo

public AbstractRmiMojo()
Method Detail

getProjectClasspathElements

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

Returns:
list of classpath elements

getOutputDirectory

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

Specified by:
getOutputDirectory in interface RmicConfig
Returns:
the directory

getClassesDirectory

public abstract java.io.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 java.util.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 java.util.List scanForRemoteClasses()
Search the input directory for classes to compile.

Returns:
a list of class names to rmic

generateUrlCompileClasspath

protected java.util.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 java.lang.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 java.lang.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.