Rio Project 4.2 API Documentation



org.rioproject.tools.maven
Class ClassDepAndJarMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.rioproject.tools.maven.ClassDepAndJarMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
OarMojo

public class ClassDepAndJarMojo
extends org.apache.maven.plugin.AbstractMojo

This goal runs the ClassDepAndJarTask utility for a module. The ClassDepAndJarTask creates a jar file from a list of classes generated by the ClassDep tool. In particular it:

  1. Searches and extracts classes directly from jar files that are specified in the Maven project's classpath. Thus it is not necessary to unjar libraries in order to include elements (classes).
  2. Creates a Jar file directly; it is not an extension of the Maven Jar plugin.
  3. Additional elements can be included in the jar file by configuring "includes" elements.


Field Summary
protected  org.apache.tools.ant.Project antProject
           
protected  org.apache.maven.archiver.MavenArchiveConfiguration archiveConfig
          The maven archive configuration to use.
protected  org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver
          The Jar archiver.
protected  org.apache.maven.project.MavenProject project
          The maven project.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ClassDepAndJarMojo()
           
 
Method Summary
protected  void createJar(CreateJar createJar, org.apache.tools.ant.Project antProject, String outputDir, File artifactResourcesDir, boolean setMainArtifact)
           
protected  void doExecute(org.apache.maven.project.MavenProject project, boolean setMainArtifact)
           
 void execute()
           
protected  CreateJar getCreateJar()
           
protected  List<CreateJar> getCreateJars()
           
protected  Collection getDependencies()
           
protected  org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver()
           
protected  org.apache.maven.project.MavenProject getMavenProject()
           
protected  org.apache.maven.project.MavenProjectHelper getProjectHelper()
           
protected  void parseDependenciesAndBuildClasspath(org.apache.tools.ant.types.Path classpath)
           
protected  File writeProjectInfo(Properties props, org.apache.maven.project.MavenProject project)
           
 
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

project

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


jarArchiver

protected org.codehaus.plexus.archiver.jar.JarArchiver jarArchiver
The Jar archiver.


archiveConfig

protected org.apache.maven.archiver.MavenArchiveConfiguration archiveConfig
The maven archive configuration to use.


antProject

protected org.apache.tools.ant.Project antProject
Constructor Detail

ClassDepAndJarMojo

public ClassDepAndJarMojo()
Method Detail

execute

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

doExecute

protected void doExecute(org.apache.maven.project.MavenProject project,
                         boolean setMainArtifact)
                  throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getMavenProject

protected org.apache.maven.project.MavenProject getMavenProject()

getDependencies

protected Collection getDependencies()

getProjectHelper

protected org.apache.maven.project.MavenProjectHelper getProjectHelper()

getCreateJars

protected List<CreateJar> getCreateJars()

getCreateJar

protected CreateJar getCreateJar()

getJarArchiver

protected org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver()

parseDependenciesAndBuildClasspath

protected void parseDependenciesAndBuildClasspath(org.apache.tools.ant.types.Path classpath)

createJar

protected void createJar(CreateJar createJar,
                         org.apache.tools.ant.Project antProject,
                         String outputDir,
                         File artifactResourcesDir,
                         boolean setMainArtifact)
                  throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

writeProjectInfo

protected File writeProjectInfo(Properties props,
                                org.apache.maven.project.MavenProject project)
                         throws IOException
Throws:
IOException

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.