net.jangaroo.jooc.mvnplugin
Class PackageApplicationMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by net.jangaroo.jooc.mvnplugin.PackageApplicationMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
JooGenerateTestResourcesMojo, WarPackageMojo

public abstract class PackageApplicationMojo
extends org.apache.maven.plugin.AbstractMojo

An abstract goal to build a Jangaroo application, either for testing or for an actual application. It aggregates all needed resources into a given Web app directory:


Field Summary
protected  org.apache.maven.project.MavenProject project
          The maven project.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
PackageApplicationMojo()
           
 
Method Summary
protected  void createWebapp(File webappDirectory)
          Create the Jangaroo Web app in the given Web app directory.
protected  Set<org.apache.maven.artifact.Artifact> getArtifacts()
           
static List<String> sort(Map<String,List<String>> artifact2directDependencies)
          Linearizes the acyclic, directed graph represented by artifact2directDependencies to a list where every item just needs items that are contained in the list before itself.
 void unpack(org.apache.maven.artifact.Artifact artifact, File target)
           
 void unpack(File target)
           
protected  void writeThisJangarooModuleScript(File scriptDirectory, Writer fw)
           
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
 

Field Detail

project

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

Constructor Detail

PackageApplicationMojo

public PackageApplicationMojo()
Method Detail

createWebapp

protected void createWebapp(File webappDirectory)
                     throws org.apache.maven.plugin.MojoExecutionException
Create the Jangaroo Web app in the given Web app directory.

Parameters:
webappDirectory - the directory where to build the Jangaroo Web app.
Throws:
org.apache.maven.plugin.MojoExecutionException - if anything goes wrong

unpack

public void unpack(File target)
            throws org.codehaus.plexus.archiver.ArchiverException
Throws:
org.codehaus.plexus.archiver.ArchiverException

unpack

public void unpack(org.apache.maven.artifact.Artifact artifact,
                   File target)
            throws org.codehaus.plexus.archiver.ArchiverException
Throws:
org.codehaus.plexus.archiver.ArchiverException

sort

public static List<String> sort(Map<String,List<String>> artifact2directDependencies)
Linearizes the acyclic, directed graph represented by artifact2directDependencies to a list where every item just needs items that are contained in the list before itself.

Parameters:
artifact2directDependencies - acyclic, directed dependency graph
Returns:
linearized dependency list

writeThisJangarooModuleScript

protected void writeThisJangarooModuleScript(File scriptDirectory,
                                             Writer fw)
                                      throws IOException
Throws:
IOException

getArtifacts

protected Set<org.apache.maven.artifact.Artifact> getArtifacts()


Copyright © 2002-2011 CoreMedia AG. All Rights Reserved.