org.freecompany.imp
public class Index extends Task
Field Summary | |
---|---|
protected List<Dependency> | dependencies |
protected String | format |
protected String | group |
protected String | name |
protected List<Repository> | repositories |
protected File | src |
protected List<AntOverride> | subprojects |
protected List<String> | types |
protected String | version |
Method Summary | |
---|---|
void | addAnt(AntOverride ant) |
void | addDependency(Dependency dependency) |
void | addRepository(Repository repository) |
protected void | buildFileset(String name, Collection<Dependency> list)
This is an inoptimal solution to building filesets for use in the build system. |
protected void | buildPath(String name, Collection<Dependency> list)
For the given list of dependencies ths method builds a corresponding Ant path element which is
inserted by reference into the project. |
void | execute()
Configures this index structure using the values and objects set on this index during
the build initialization. |
String | getGroup() |
String | getName() |
List<AntOverride> | getSubprojects() |
List<String> | getTypes() |
protected void | include(String name) |
void | setFormat(String format) |
void | setGroup(String group) |
void | setProject(Project project) |
void | setSrc(File src) |
void | setTypes(String types) |
protected void | setupDependencies() |
protected void | setupIndexFile()
If this index specifies a source document with the src attribute it will be parsed
according to the format specified. |
protected void | setupReferences()
Takes the local object sets that have been built up by defining dependencies, resolution tasks
and index file parsing and publishes them to the build project context. |
protected void | setupRepositories()
Sets up any locally defined repositories in the index element. |
type
attribute, a check is made to see if a target for that type is already regsitered in the project. If not,
then the index code will automatically attempt to resolve a template corresponding to the type against the
base module. For example, providing the index type war
will cause the index to search for
any locally definined target named war
or one in any imports in the build file. If none is
found the index will attempt to import the uri #war.template
. This fragment is resolved against
the core module which, if the template is provided with Imp, will maintain an alias mapping that common name to
the specific template version and URI.
After setting up the complete environment for building, this method will finally iterate through the
Imp specific property types to execute them.src
attribute it will be parsed
according to the format specified. The information gathered from parsing the index file is added
to that which is specified directly in the index element, except where it is contradictory, in which
case the index file takes presidence.