/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. */
  23. package com.atlassian.maven.plugins.amps.util.ant;
  24. import org.apache.tools.ant.Task;
  25. /**
  26. * Interface that allows random classes to use Ant tasks without needing an
  27. * explicit reference to a project, target or task.
  28. *
  29. * @version $Id$
  30. */
  31. public interface AntTaskFactory
  32. {
  33. /**
  34. * Returns the task that is mapped to the specified name.
  35. *
  36. * Implementations of this interface should correctly initialize the task by
  37. * setting the name, the project and optionally the owning target.
  38. *
  39. * @param taskName The logical name of the task
  40. * @return A new instance of the task mapped to the name, or
  41. * <code>null</code> if a corresponding task could not be created
  42. */
  43. Task createTask(String taskName);
  44. }