From 5d3369eb34592c9b7774c3a4a3fe01be0647e11c Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sun, 17 Jun 2001 00:46:31 +0000 Subject: [PATCH] Remove old register-tasklib task git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269200 13f79535-47bb-0310-9956-ffa450edef68 --- .../ant/modules/core/RegisterTasklib.java | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklib.java diff --git a/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklib.java b/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklib.java deleted file mode 100644 index d153ed234..000000000 --- a/proposal/myrmidon/src/java/org/apache/ant/modules/core/RegisterTasklib.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) The Apache Software Foundation. All rights reserved. - * - * This software is published under the terms of the Apache Software License - * version 1.1, a copy of which has been included with this distribution in - * the LICENSE file. - */ -package org.apache.ant.modules.core; - -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; -import org.apache.avalon.framework.component.ComponentException; -import org.apache.avalon.framework.component.ComponentManager; -import org.apache.avalon.framework.component.Composable; -import org.apache.myrmidon.api.AbstractTask; -import org.apache.myrmidon.api.TaskException; -import org.apache.myrmidon.components.deployer.DeploymentException; -import org.apache.myrmidon.components.deployer.Deployer; - -/** - * Method to register a tasklib. - * - * @author Peter Donald - */ -public class RegisterTasklib - extends AbstractTask - implements Composable -{ - protected String m_lib; - protected Deployer m_deployer; - - public void compose( final ComponentManager componentManager ) - throws ComponentException - { - m_deployer = (Deployer)componentManager.lookup( Deployer.ROLE ); - } - - public void setLib( final String lib ) - { - m_lib = lib; - } - - public void execute() - throws TaskException - { - if( null == m_lib ) - { - throw new TaskException( "Must specify lib parameter" ); - } - - final File file = getContext().resolveFile( m_lib ); - - try - { - m_deployer.deploy( file ); - } - catch( final DeploymentException de ) - { - throw new TaskException( "Error registering resource", de ); - } - } -}