com.atlassian.maven.plugins.pdk
Class BundleJarsMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.atlassian.maven.plugins.pdk.BasePdkMojo
          extended by com.atlassian.maven.plugins.pdk.BundleJarsMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class BundleJarsMojo
extends BasePdkMojo

Code borrowed liberally from the standard Maven 2 'war' plugin.


Field Summary
protected  org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
          To look up Archiver/UnArchiver implementations
 
Fields inherited from class com.atlassian.maven.plugins.pdk.BasePdkMojo
artifactFactory
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
BundleJarsMojo()
           
 
Method Summary
 void bundleDependencies(org.apache.maven.project.MavenProject project, java.io.File buildDir)
          Bundles the required jars the specified project.
 void execute()
           
protected  java.lang.String[] getDependencyExcludes()
          Returns a string array of the excludes to be used when adding dependentcies as an overlay onto this artifact.
protected  java.lang.String[] getDependencyIncludes()
          Returns a string array of the includes to be used when adding dependencies as an overlay onto this artifact.
 java.lang.String getLocalRepository()
           
 org.apache.maven.project.MavenProject getProject()
           
 java.lang.String getTarget()
           
 void setDependencyExcludes(java.lang.String dependencyExcludes)
           
 void setExtractDependencies(boolean extractDependencies)
           
 void setLocalRepository(java.lang.String localRepository)
           
 void setProject(org.apache.maven.project.MavenProject project)
           
 void setTarget(java.lang.String target)
           
 void setWorkDirectory(java.io.File workDirectory)
           
 
Methods inherited from class com.atlassian.maven.plugins.pdk.BasePdkMojo
copy, copyFiles, getArtifact, urlEncode
 
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

archiverManager

protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
To look up Archiver/UnArchiver implementations

Constructor Detail

BundleJarsMojo

public BundleJarsMojo()
Method Detail

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

bundleDependencies

public void bundleDependencies(org.apache.maven.project.MavenProject project,
                               java.io.File buildDir)
                        throws org.apache.maven.plugin.MojoExecutionException,
                               java.io.IOException,
                               org.apache.maven.plugin.MojoFailureException
Bundles the required jars the specified project.

Classes, libraries and tld files are copied to the buildDir during this phase.

Parameters:
project - the maven project
buildDir - The temporary atlassian directory for building the plugin.
Throws:
java.io.IOException - if an error occured while building the plugin
org.apache.maven.plugin.MojoFailureException - if there is a failure.
org.apache.maven.plugin.MojoExecutionException - if there is a problem while executing.

getDependencyExcludes

protected java.lang.String[] getDependencyExcludes()
Returns a string array of the excludes to be used when adding dependentcies as an overlay onto this artifact.

Returns:
an array of tokens to exclude

getDependencyIncludes

protected java.lang.String[] getDependencyIncludes()
Returns a string array of the includes to be used when adding dependencies as an overlay onto this artifact.

Returns:
an array of tokens to include

setExtractDependencies

public void setExtractDependencies(boolean extractDependencies)

getProject

public org.apache.maven.project.MavenProject getProject()

setProject

public void setProject(org.apache.maven.project.MavenProject project)

getLocalRepository

public java.lang.String getLocalRepository()

setLocalRepository

public void setLocalRepository(java.lang.String localRepository)

getTarget

public java.lang.String getTarget()

setTarget

public void setTarget(java.lang.String target)

setWorkDirectory

public void setWorkDirectory(java.io.File workDirectory)

setDependencyExcludes

public void setDependencyExcludes(java.lang.String dependencyExcludes)


Copyright © 2009 Adaptavist.com Ltd. All Rights Reserved.