org.fusesource.mvnplugins.uberize
Class DefaultUberizer

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.fusesource.mvnplugins.uberize.DefaultUberizer
All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled, Uberizer

public class DefaultUberizer
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements Uberizer

Author:
Jason van Zyl, Hiram Chirino

Field Summary
 
Fields inherited from interface org.fusesource.mvnplugins.uberize.Uberizer
ROLE
 
Constructor Summary
DefaultUberizer()
           
 
Method Summary
 HashMap<String,String> getClassRelocations()
          Transformations which re-map classes should updated this map.
 File pickOneSource(TreeMap<String,UberEntry> tree, UberEntry entry)
          When a transformation can't aggregate multiple sources for an entry..
static File prepareFile(File basedir, String path)
           
 void uberize(File targetDir, Set sourceJars, File uberJar, List<Filter> filters, List<Transformer> transformers)
          Creates an uber jar from the source jars.
static File writeFile(File basedir, String path, InputStream is)
           
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUberizer

public DefaultUberizer()
Method Detail

uberize

public void uberize(File targetDir,
                    Set sourceJars,
                    File uberJar,
                    List<Filter> filters,
                    List<Transformer> transformers)
             throws IOException
Description copied from interface: Uberizer
Creates an uber jar from the source jars. The work directory can be used to stage data.

Specified by:
uberize in interface Uberizer
Throws:
IOException

pickOneSource

public File pickOneSource(TreeMap<String,UberEntry> tree,
                          UberEntry entry)
                   throws IOException
Description copied from interface: Uberizer
When a transformation can't aggregate multiple sources for an entry.. this method asks the Uberizer to pick one source for it to use.

Specified by:
pickOneSource in interface Uberizer
Returns:
Throws:
IOException

getClassRelocations

public HashMap<String,String> getClassRelocations()
Description copied from interface: Uberizer
Transformations which re-map classes should updated this map. It's a map of 'original class name' to 'new class name'.

Specified by:
getClassRelocations in interface Uberizer
Returns:
the classes that be been relocated.

writeFile

public static File writeFile(File basedir,
                             String path,
                             InputStream is)
                      throws IOException
Throws:
IOException

prepareFile

public static File prepareFile(File basedir,
                               String path)
                        throws IOException
Throws:
IOException


Copyright © 2009-2011 FuseSource. All Rights Reserved.