it.geosolutions.tools.ant
Class Task

java.lang.Object
  extended by it.geosolutions.tools.ant.Task

public class Task
extends Object


Constructor Summary
Task()
           
 
Method Summary
static void addToProject(org.apache.tools.ant.Project project, org.apache.tools.ant.Target... targets)
           
static void addToTarget(org.apache.tools.ant.Target target, org.apache.tools.ant.Task... tasks)
           
static org.apache.tools.ant.Project buildProject(org.apache.tools.ant.Target... targets)
           
static org.apache.tools.ant.Project buildSimpleProject(String targetName, String... executables)
           
static org.apache.tools.ant.Project buildSimpleProject(String targetName, org.apache.tools.ant.Task... tasks)
           
static org.apache.tools.ant.taskdefs.ExecTask[] buildTask(String... executables)
           
static org.apache.tools.ant.taskdefs.ExecTask buildTask(String executable, File workingDir, String[] args, org.apache.tools.ant.types.Environment.Variable[] envVars)
          builds an ExecTask which could be executed or linked into a project.
static org.apache.tools.ant.taskdefs.ExecTask buildTask(String executable, String[] args)
           
static int connectTargets(org.apache.tools.ant.Project project, boolean updateChild, boolean updateParent, org.apache.tools.ant.Target... targets)
          connect targets to the project
static int connectTasks(org.apache.tools.ant.Target target, boolean updateChild, boolean updateParent, org.apache.tools.ant.Task... tasks)
          connect tasks to the target and/or to the parent project.
static org.apache.tools.ant.types.Environment.Variable[] loadVars(File props)
           
static void updateEnv(File props, org.apache.tools.ant.types.Environment env)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Task

public Task()
Method Detail

updateEnv

public static void updateEnv(File props,
                             org.apache.tools.ant.types.Environment env)
                      throws IOException
Throws:
IOException

loadVars

public static org.apache.tools.ant.types.Environment.Variable[] loadVars(File props)
                                                                  throws IOException
Throws:
IOException

buildSimpleProject

public static org.apache.tools.ant.Project buildSimpleProject(String targetName,
                                                              String... executables)
                                                       throws IllegalArgumentException
Throws:
IllegalArgumentException

buildSimpleProject

public static org.apache.tools.ant.Project buildSimpleProject(String targetName,
                                                              org.apache.tools.ant.Task... tasks)
                                                       throws IllegalArgumentException
Throws:
IllegalArgumentException

buildProject

public static org.apache.tools.ant.Project buildProject(org.apache.tools.ant.Target... targets)
                                                 throws IllegalArgumentException
Throws:
IllegalArgumentException

connectTargets

public static int connectTargets(org.apache.tools.ant.Project project,
                                 boolean updateChild,
                                 boolean updateParent,
                                 org.apache.tools.ant.Target... targets)
connect targets to the project

Parameters:
project -
updateChild - connect tasks as child of target and targets as child of project
updateParent - update tasks parent project to the target parent one
targets -
Returns:

connectTasks

public static int connectTasks(org.apache.tools.ant.Target target,
                               boolean updateChild,
                               boolean updateParent,
                               org.apache.tools.ant.Task... tasks)
                        throws IllegalArgumentException
connect tasks to the target and/or to the parent project. Be sure that the target is already connected to the Project.

Parameters:
target -
updateChild - connect tasks as child of target
updateParent - update tasks parent project to the target parent one
tasks - list of tasks to update
Returns:
the number of tasks updated
Throws:
IllegalArgumentException

addToProject

public static void addToProject(org.apache.tools.ant.Project project,
                                org.apache.tools.ant.Target... targets)
                         throws IllegalArgumentException
Throws:
IllegalArgumentException

addToTarget

public static void addToTarget(org.apache.tools.ant.Target target,
                               org.apache.tools.ant.Task... tasks)
                        throws IllegalArgumentException
Throws:
IllegalArgumentException

buildTask

public static org.apache.tools.ant.taskdefs.ExecTask buildTask(String executable,
                                                               File workingDir,
                                                               String[] args,
                                                               org.apache.tools.ant.types.Environment.Variable[] envVars)
                                                        throws IllegalArgumentException
builds an ExecTask which could be executed or linked into a project.

Parameters:
executable -
workingDir -
args -
envVars -
Returns:
Throws:
IllegalArgumentException

buildTask

public static org.apache.tools.ant.taskdefs.ExecTask[] buildTask(String... executables)
                                                          throws IllegalArgumentException
Throws:
IllegalArgumentException

buildTask

public static org.apache.tools.ant.taskdefs.ExecTask buildTask(String executable,
                                                               String[] args)
                                                        throws IllegalArgumentException
Throws:
IllegalArgumentException


Copyright © 2011-2012 GeoSolutions. All Rights Reserved.