01: /*
02: * Copyright 2005 Paul Hinds
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.tp23.antinstaller.antmod.taskdefs;
17:
18: import org.apache.tools.ant.BuildException;
19: import org.apache.tools.ant.Target;
20: import org.apache.tools.ant.Task;
21:
22: /**
23: *
24: * @author teknopaul
25: *
26: */
27: public class CallTargetTask extends Task {
28:
29: private String target;
30:
31: public void execute() throws BuildException {
32: Target antTarget = (Target) getProject().getTargets().get(
33: target);
34: antTarget.execute();
35: }
36:
37: public void setTarget(String target) {
38: this.target = target;
39: }
40:
41: }
|