PageRenderTime 22ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/maven-amps-plugin/src/main/java/com/atlassian/maven/plugins/amps/util/ant/AntTaskFactory.java

https://bitbucket.org/mmeinhold/amps
Java | 46 lines | 6 code | 2 blank | 38 comment | 0 complexity | 5496845929c9053e15007a5a872e8ed0 MD5 | raw file
 1/*
 2 * ========================================================================
 3 *
 4 * Copyright 2003-2004 The Apache Software Foundation. Code from this file
 5 * was originally imported from the Jakarta Cactus project.
 6 *
 7 * Codehaus CARGO, copyright 2004-2010 Vincent Massol.
 8 *
 9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 *   http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 *
21 * ========================================================================
22 */
23package com.atlassian.maven.plugins.amps.util.ant;
24
25import org.apache.tools.ant.Task;
26
27/**
28 * Interface that allows random classes to use Ant tasks without needing an
29 * explicit reference to a project, target or task.
30 *
31 * @version $Id$
32 */
33public interface AntTaskFactory
34{
35    /**
36     * Returns the task that is mapped to the specified name.
37     *
38     * Implementations of this interface should correctly initialize the task by
39     * setting the name, the project and optionally the owning target.
40     *
41     * @param taskName The logical name of the task
42     * @return A new instance of the task mapped to the name, or
43     *         <code>null</code> if a corresponding task could not be created
44     */
45    Task createTask(String taskName);
46}