org.jomc.mojo
Class AbstractAttachMojo

Package class diagram package AbstractAttachMojo
java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jomc.mojo.AbstractAttachMojo
All Implemented Interfaces:
ContextEnabled, Mojo
Direct Known Subclasses:
MainModuleAttachMojo, TestModuleAttachMojo

public abstract class AbstractAttachMojo
extends AbstractMojo

Base class for attaching artifacts to a project.

Version:
$JOMC: AbstractAttachMojo.java 3838 2011-10-08 20:15:41Z schulte2005 $
Author:
Christian Schulte

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractAttachMojo()
          Creates a new AbstractAttachMojo instance.
 
Method Summary
 void execute()
           
protected abstract  String getArtifactClassifier()
          Gets the classifier of the artifact to attach.
protected abstract  File getArtifactFile()
          Gets the file of the artifact to attach.
protected abstract  String getArtifactType()
          Gets the type of the artifact to attach.
protected abstract  String getExecutionStrategy()
          Gets the execution strategy of the instance.
protected  MavenProject getMavenProject()
          Gets the Maven project of the instance.
protected  MavenProjectHelper getMavenProjectHelper()
          Gets the Maven project helper of the instance.
protected  MavenSession getMavenSession()
          Gets the Maven session of the instance.
protected  File getSessionDirectory()
          Gets the directory holding the session related files of the project.
protected  boolean isVerbose()
          Gets a flag indicating verbose output is enabled.
protected  void setVerbose(boolean value)
          Sets the flag indicating verbose output is enabled.
 
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

AbstractAttachMojo

public AbstractAttachMojo()
Creates a new AbstractAttachMojo instance.

Method Detail

getMavenProject

protected MavenProject getMavenProject()
                                throws MojoExecutionException
Gets the Maven project of the instance.

Returns:
The Maven project of the instance.
Throws:
MojoExecutionException - if getting the Maven project of the instance fails.
Since:
1.1

getMavenSession

protected MavenSession getMavenSession()
                                throws MojoExecutionException
Gets the Maven session of the instance.

Returns:
The Maven session of the instance.
Throws:
MojoExecutionException - if getting the Maven session of the instance fails.
Since:
1.1

getMavenProjectHelper

protected MavenProjectHelper getMavenProjectHelper()
                                            throws MojoExecutionException
Gets the Maven project helper of the instance.

Returns:
The Maven project helper of the instance.
Throws:
MojoExecutionException - if getting the Maven project helper of the instance fails.
Since:
1.1

getSessionDirectory

protected File getSessionDirectory()
                            throws MojoExecutionException
Gets the directory holding the session related files of the project.

Returns:
The directory holding the session related files of the project.
Throws:
MojoExecutionException - if getting the directory fails.
Since:
1.1

isVerbose

protected final boolean isVerbose()
                           throws MojoExecutionException
Gets a flag indicating verbose output is enabled.

Returns:
true, if verbose output is enabled; false, if information messages are suppressed.
Throws:
MojoExecutionException - if getting the flag fails.
Since:
1.1

setVerbose

protected final void setVerbose(boolean value)
                         throws MojoExecutionException
Sets the flag indicating verbose output is enabled.

Parameters:
value - true, to enable verbose output; false, to suppress information messages.
Throws:
MojoExecutionException - if setting the flag fails.
Since:
1.1

getArtifactFile

protected abstract File getArtifactFile()
Gets the file of the artifact to attach.

Returns:
The file of the artifact to attach.

getArtifactClassifier

protected abstract String getArtifactClassifier()
Gets the classifier of the artifact to attach.

Returns:
The classifier of the artifact to attach.

getArtifactType

protected abstract String getArtifactType()
Gets the type of the artifact to attach.

Returns:
The type of the artifact to attach.

getExecutionStrategy

protected abstract String getExecutionStrategy()
Gets the execution strategy of the instance.

Returns:
The execution strategy of the instance.
Since:
1.1

execute

public final void execute()
                   throws MojoExecutionException,
                          MojoFailureException
Throws:
MojoExecutionException
MojoFailureException


Copyright © 2005-2012 The JOMC Project. All Rights Reserved.Get JOMC at SourceForge.net. Fast, secure and Free Open Source software downloads
Please note that this documentation is maintained by non-native english speaking authors. As such, you may encounter phrases or wordings which seem imprecise or may even have a totally different meaning to native english speaking readers than what the individual author was trying to express. If you are a native english speaking reader and find any such phrases or wordings we kindly ask you to send an email to the corresponding author and help us improve this documentation in order to avoid misunderstandings. You will find the authors' email addresses at the top of each class. Please accept our apologies for any inconvenience caused.