net.jangaroo.jooc.mvnplugin
Class PackageApplicationMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
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:
- extract all dependent jangaroo artifacts
- optionally add Jangaroo compiler output from the current module
- concatenate .js from all dependent jangaroo artifacts into jangaroo-application.js in the correct order
|
Field Summary |
protected org.apache.maven.project.MavenProject |
project
The maven project. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
| 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 |
project
protected org.apache.maven.project.MavenProject project
- The maven project.
PackageApplicationMojo
public PackageApplicationMojo()
getPackageSourceDirectory
public abstract File getPackageSourceDirectory()
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.