* Added a very basic VFS manager service implementation. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271359 13f79535-47bb-0310-9956-ffa450edef68master
@@ -1 +1,2 @@ | |||||
missing-home-dir.error=Cannot locate antRun scripts: Property 'myrmidon.home' not specified | |||||
missing-home-dir.error=Cannot locate antRun scripts: Property 'myrmidon.home' not specified | |||||
create-vfs-manager.error=Could not create the VFS manager. |
@@ -0,0 +1,45 @@ | |||||
/* | |||||
* 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.txt file. | |||||
*/ | |||||
package org.apache.myrmidon.framework.factorys; | |||||
import org.apache.aut.vfs.FileSystemManager; | |||||
import org.apache.aut.vfs.impl.DefaultFileSystemManager; | |||||
import org.apache.myrmidon.interfaces.service.ServiceFactory; | |||||
import org.apache.myrmidon.interfaces.service.ServiceException; | |||||
import org.apache.avalon.excalibur.i18n.Resources; | |||||
import org.apache.avalon.excalibur.i18n.ResourceManager; | |||||
/** | |||||
* A factory that creates the {@link FileSystemManager} service. | |||||
* | |||||
* @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a> | |||||
* @version $Revision$ $Date$ | |||||
*/ | |||||
public class VfsManagerFactory | |||||
implements ServiceFactory | |||||
{ | |||||
private final static Resources REZ | |||||
= ResourceManager.getPackageResources( VfsManagerFactory.class ); | |||||
/** | |||||
* Create a service that coresponds to this factory. | |||||
*/ | |||||
public Object createService() | |||||
throws ServiceException | |||||
{ | |||||
try | |||||
{ | |||||
return new DefaultFileSystemManager(); | |||||
} | |||||
catch( Exception e ) | |||||
{ | |||||
final String message = REZ.getString( "create-vfs-manager.error" ); | |||||
throw new ServiceException( message ); | |||||
} | |||||
} | |||||
} |
@@ -1,9 +1,11 @@ | |||||
<roles version="1.0"> | <roles version="1.0"> | ||||
<role shorthand="task" name="org.apache.myrmidon.api.Task"/> | |||||
<role shorthand="data-type" name="org.apache.myrmidon.framework.DataType"/> | |||||
<role shorthand="listener" name="org.apache.myrmidon.listeners.ProjectListener"/> | |||||
<role shorthand="aspect" name="org.apache.myrmidon.aspects.AspectHandler"/> | |||||
<role shorthand="project-builder" name="org.apache.myrmidon.interfaces.builder.ProjectBuilder"/> | |||||
<role shorthand="converter" name="org.apache.myrmidon.converter.Converter"/> | |||||
<role shorthand="configurer" name="org.apache.myrmidon.interfaces.configurer.Configurer"/> | |||||
<role shorthand="task" name="org.apache.myrmidon.api.Task"/> | |||||
<role shorthand="data-type" name="org.apache.myrmidon.framework.DataType"/> | |||||
<role shorthand="listener" name="org.apache.myrmidon.listeners.ProjectListener"/> | |||||
<role shorthand="aspect" name="org.apache.myrmidon.aspects.AspectHandler"/> | |||||
<role shorthand="project-builder" name="org.apache.myrmidon.interfaces.builder.ProjectBuilder"/> | |||||
<role shorthand="converter" name="org.apache.myrmidon.converter.Converter"/> | |||||
<role shorthand="configurer" name="org.apache.myrmidon.interfaces.configurer.Configurer"/> | |||||
<role shorthand="exec-manager" name="org.apache.aut.nativelib.ExecManager"/> | |||||
<role shorthand="file-system-manager" name="org.apache.aut.vfs.FileSystemManager"/> | |||||
</roles> | </roles> |
@@ -1,4 +1,9 @@ | |||||
<services> | |||||
<service role="org.apache.aut.nativelib.ExecManager" | |||||
factory="org.apache.myrmidon.framework.factorys.ExecManagerFactory"/> | |||||
</services> | |||||
<services version="1.0"> | |||||
<exec-manager factory="org.apache.myrmidon.framework.factorys.ExecManagerFactory"/> | |||||
<file-system-manager factory="org.apache.myrmidon.framework.factorys.VfsManagerFactory"> | |||||
<provider scheme="zip" classname="org.apache.aut.vfs.provider.zip.ZipFileSystemProvider"/> | |||||
<provider scheme="jar" classname="org.apache.aut.vfs.provider.zip.ZipFileSystemProvider"/> | |||||
<provider scheme="smb" classname="org.apache.aut.vfs.provider.smb.SmbFileSystemProvider"/> | |||||
<provider scheme="ftp" classname="org.apache.aut.vfs.provider.ftp.FtpFileSystemProvider"/> | |||||
</file-system-manager> | |||||
</services> |