de.enough.polish.ant.build
Class LibrariesSetting

java.lang.Object
  extended by de.enough.polish.ant.ConditionalElement
      extended by de.enough.polish.ant.Setting
          extended by de.enough.polish.ant.build.LibrariesSetting

public class LibrariesSetting
extends Setting

A container for several <library> tags.

Copyright Enough Software 2005-2011

Author:
Robert Virkus, j2mepolish@enough.de

Field Summary
static String KEY_ENVIRONMENT
          Key for the environment.
 
Constructor Summary
LibrariesSetting(Environment environment)
          Creates a new libraries setting
 
Method Summary
 void add(LibrariesSetting setting)
           
 void addConfiguredLibrary(LibrarySetting setting)
           
 void addLibrary(File path)
          Adds a library to this setting.
 boolean copyToCache(File binaryBaseDir)
          Copies all third party binary libraries to the cache.
 LibrarySetting[] getLibraries()
           
 
Methods inherited from class de.enough.polish.ant.Setting
addConfiguredParameter, getAllParameters, getParameters, hasParameters
 
Methods inherited from class de.enough.polish.ant.ConditionalElement
getCondition, getIf, getUnless, isActive, isActive, isActive, isActive, setIf, setUnless
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_ENVIRONMENT

public static final String KEY_ENVIRONMENT
Key for the environment.

See Also:
Environment.get(String), Constant Field Values
Constructor Detail

LibrariesSetting

public LibrariesSetting(Environment environment)
Creates a new libraries setting

Parameters:
environment - the environment
Method Detail

addConfiguredLibrary

public void addConfiguredLibrary(LibrarySetting setting)

addLibrary

public void addLibrary(File path)
Adds a library to this setting.

Parameters:
path - the path to the library

getLibraries

public LibrarySetting[] getLibraries()

add

public void add(LibrariesSetting setting)
Parameters:
setting -

copyToCache

public boolean copyToCache(File binaryBaseDir)
                    throws FileNotFoundException,
                           IOException
Copies all third party binary libraries to the cache.

Parameters:
binaryBaseDir - the base dir of the cache
Returns:
true when at least one library had to be written again
Throws:
IOException - when a file could not be read or written
FileNotFoundException - when a file was not found