com.github.jknack.amd4j
Class OptimizeMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.github.jknack.amd4j.Amd4jMojo
          extended by com.github.jknack.amd4j.OptimizeMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class OptimizeMojo
extends Amd4jMojo

Optimize an AMD script file.

Since:
0.1.0

Field Summary
 
Fields inherited from class com.github.jknack.amd4j.Amd4jMojo
baseUrl, findNestedDependencies, names, paths
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
OptimizeMojo()
           
 
Method Summary
 void doExecute(Amd4j amd4j, Config config)
          Execute the command.
protected  String header(String name)
          Generated a header for error reporting.
protected  Config merge(String name, Config config)
          Override any option that migh be specify from the command line.
protected  Config newConfig()
          Creates a new Config.
 
Methods inherited from class com.github.jknack.amd4j.Amd4jMojo
execute, execute, printf, processError
 
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

OptimizeMojo

public OptimizeMojo()
Method Detail

doExecute

public void doExecute(Amd4j amd4j,
                      Config config)
               throws IOException
Description copied from class: Amd4jMojo
Execute the command.

Specified by:
doExecute in class Amd4jMojo
Parameters:
amd4j - An Amd4j instance.
config - The configuration options.
Throws:
IOException - If something goes wrong.

newConfig

protected Config newConfig()
                    throws IOException
Description copied from class: Amd4jMojo
Creates a new Config.

Overrides:
newConfig in class Amd4jMojo
Returns:
A new Config.
Throws:
IOException - If something goes wrong.

merge

protected Config merge(String name,
                       Config config)
                throws IOException
Description copied from class: Amd4jMojo
Override any option that migh be specify from the command line.

Overrides:
merge in class Amd4jMojo
config - The configuration options.
Returns:
The same configuration options.
Throws:
IOException - If file handler can't be obtained.

header

protected String header(String name)
Description copied from class: Amd4jMojo
Generated a header for error reporting.

Overrides:
header in class Amd4jMojo
Parameters:
name - The script's name.
Returns:
A header.


Copyright © 2013. All Rights Reserved.