tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ple...@apache.org
Subject [04/24] incubator-tamaya git commit: Removed all modules from the main repository. They will be reborn in separate ASF repository.
Date Thu, 15 Sep 2016 17:26:21 GMT
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceLocator.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceLocator.java b/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceLocator.java
deleted file mode 100644
index c301eea..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceLocator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource;
-
-import java.net.URL;
-import java.util.Collection;
-
-/**
- * Delegate interface for loading URLs from a given data resource locator pattern String.
- */
-public interface ResourceLocator {
-
-    /**
-     * Method to lookup a given list of URLs, identified by the given expression.
-     * @param classLoader the classloader to be used, if necessary.
-     * @param expression the expression.
-     * @return a collection of URL found.
-     */
-    Collection<URL> lookup(ClassLoader classLoader, String expression);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceResolver.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceResolver.java b/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceResolver.java
deleted file mode 100644
index d27b38f..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/ResourceResolver.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource;
-
-import java.net.URL;
-import java.util.Collection;
-
-/**
- * Interface to be implemented by modules. It supports loading of files or classpath resources either directly or by
- * defining an Ant-style resource pattern:
- * <ul>
- *     <li>'*' is a placeholder for any character (0..n)</li>
- *     <li>'**' is a placeholder for any number of subdirectories going down a directory structure recursively.</li>
- *     <li>'?' is a placeholder for exact one character</li>
- * </ul>
- * Given that the following expressions are valid expressions:
- * <pre>
- *     classpath:javax/annotations/*
- *     javax?/annotations&#47;**&#47;*.class
- *     org/apache/tamaya&#47;**&#47;tamayaconfig.properties
- *     file:C:/temp/*.txt
- *     file:C:\**\*.ini
- *     C:\Programs\**&#47;*.ini
- *     /user/home/A*b101_?.pid
- *     /var/logs&#47;**&#47;*.log
- * </pre>
- */
-public interface ResourceResolver {
-
-    /**
-     * Resolves resource expressions to a list of {@link URL}s. Hereby
-     * the ordering of format matches the input of the resolved expressions. Nevertheless be aware that
-     * there is no determined ordering of format located within a classloader.
-     *
-     * @param expressions the expressions to be resolved, not empty.
-     * @return the corresponding collection of current {@link URL}s found, never
-     * null.
-     * .
-     */
-    Collection<URL> getResources(Collection<String> expressions);
-
-    /**
-     * Resolves resource expressions to a list of {@link URL}s. Hereby
-     * the ordering of format matches the input of the resolved expressions. Nevertheless be aware that
-     * there is no determined ordering of format located within a classloader.
-     *
-     * @param expressions the expressions to be resolved, not empty.
-     * @return the corresponding collection of current {@link URL}s found, never
-     * null.
-     * .
-     */
-    Collection<URL> getResources(String... expressions);
-
-    /**
-     * Resolves resource expressions to a list of {@link URL}s, considerubg
-     * the given classloader for classloader dependent format. Hereby
-     * the ordering of format matches the input of the resolved expressions. Nevertheless be aware that
-     * there is no determined ordering of format located within a classloader.
-     *
-     * @param classLoader classloader to use for resolving.
-     * @param expressions the expressions to be resolved, not empty.
-     * @return the corresponding collection of current {@link URL}s found, never {@code null}.
-     */
-    Collection<URL> getResources(ClassLoader classLoader, String... expressions);
-
-    /**
-     * Resolves resource expressions to a list of {@link URL}s, considerubg
-     * the given classloader for classloader dependent format. Hereby
-     * the ordering of format matches the input of the resolved expressions. Nevertheless be aware that
-     * there is no determined ordering of format located within a classloader.
-     *
-     * @param classLoader classloader to use for resolving.
-     * @param expressions the expressions to be resolved, not empty.
-     * @return the corresponding collection of current {@link URL}s found,
-     * never {@code null}.
-     */
-    Collection<URL> getResources(ClassLoader classLoader, Collection<String> expressions);
-
-    /**
-     * Access the currently registered {@link ResourceLocator} instances.
-     * @return the currently known {@link ResourceLocator} instances, never null.
-     */
-    Collection<ResourceLocator> getResourceLocators();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClassPathResourceLocator.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClassPathResourceLocator.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClassPathResourceLocator.java
deleted file mode 100644
index 5a49d50..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClassPathResourceLocator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import org.apache.tamaya.resource.ResourceLocator;
-
-import javax.annotation.Priority;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.logging.Logger;
-
-/**
- * Created by atsticks on 01.03.16.
- */
-@Priority(90)
-public class ClassPathResourceLocator implements ResourceLocator{
-    /**
-     * The logger used.
-     */
-    private static final Logger LOG = Logger.getLogger(ClassPathResourceLocator.class.getName());
-
-    /**
-     * Tries to evaluate the location passed by loading from the classloader.
-     * @param classLoader the class loader to use
-     * @param expression the path expression
-     * @return the resources found.
-     */
-    @Override
-    public Collection<URL> lookup(ClassLoader classLoader, String expression) {
-        List<URL> resources = new ArrayList<>();
-        try {
-            Enumeration<URL> urls = classLoader.getResources(expression);
-            while (urls.hasMoreElements()) {
-                URL url = urls.nextElement();
-                resources.add(url);
-            }
-            return resources;
-        } catch (IOException | RuntimeException e) {
-            LOG.finest("Failed to load resource from CP: " + expression);
-            return Collections.emptySet();
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "ClassPathResourceLocator -> classpath:<expression>, e.g. classpath:META-INF/services/*Resolver";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClasspathCollector.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClasspathCollector.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClasspathCollector.java
deleted file mode 100644
index 4eb6b3e..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/ClasspathCollector.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.net.JarURLConnection;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Collector that searches files based on Ant styled patterns. For example the following patterns would be matched:
- * <pre>
- *     classpath:javax/annotations/*
- *     javax?/annotations&#47;**&#47;*.class
- *     org/apache/tamaya&#47;**&#47;tamayaconfig.properties
- * </pre>
- */
-public class ClasspathCollector {
-
-    /**
-     * JAR protocol.
-     */
-    private static final String PROTOCOL_JAR = "jar";
-
-    /**
-     * Separator between JAR file URL and the internal jar file path.
-     */
-    private static final String JAR_URL_SEPARATOR = "!/";
-
-    /**
-     * ZIP protocol.
-     */
-    private static final String PROTOCOL_ZIP = "zip";
-
-    /**
-     * ZIP protocol for a JBoss jar file entry: "vfszip".
-     */
-    private static final String PROTOCOL_VFSZIP = "vfszip";
-
-    /**
-     * URL protocol for an WebSphere jar file: "wsjar".
-     */
-    private static final String PROTOCOL_WSJAR = "wsjar";
-
-    /**
-     * URL protocol for an entry from an OC4J jar.
-     */
-    private static final String PROTOCOL_CODE_SOURCE = "code-source";
-
-    /**
-     * The logger used.
-     */
-    private static final Logger LOG = Logger.getLogger(ClasspathCollector.class.getName());
-
-    /**
-     * Prefix used for explicitly selecting this collector.
-     */
-    public static final String CLASSPATH_PREFIX = "classpath:";
-
-    /**
-     * The classloader used to load the resources.
-     */
-    private final ClassLoader classLoader;
-
-    /**
-     * Creates a new instance.
-     *
-     * @param classLoader the class loader to be used, not null.
-     */
-    public ClasspathCollector(ClassLoader classLoader) {
-        this.classLoader = Objects.requireNonNull(classLoader);
-    }
-
-    /**
-     * Collect all classpath resources given the expression.
-     *
-     * @param expression the expression, not null.
-     * @return the resources found.
-     */
-    public Collection<URL> collectFiles(String expression) {
-        if (expression.startsWith(CLASSPATH_PREFIX)) {
-            expression = expression.substring(CLASSPATH_PREFIX.length());
-        }
-        if (expression.startsWith("/")) {
-            expression = expression.substring(1);
-        }
-        Locator locator = Locator.of(expression);
-        List<URL> result = new ArrayList<>();
-        try {
-            Enumeration<URL> rootResources = this.classLoader.getResources(locator.getRootPath());
-            while (rootResources.hasMoreElements()) {
-                URL resource = rootResources.nextElement();
-                try {
-                    if (isJarFile(resource)) {
-                        result.addAll(doFindPathMatchingJarResources(resource, locator.getSubPath()));
-                    } else if (resource.getProtocol().startsWith(PROTOCOL_VFSZIP)) {
-                        result.addAll(findMatchingVfsResources(resource, locator.getSubPath()));
-                    } else {
-                        result.addAll(FileCollector.traverseAndSelectFromChildren(getFile(resource),
-                                locator.getSubPathTokens(), 0));
-                    }
-                } catch (URISyntaxException | IOException e) {
-                    LOG.log(Level.SEVERE, "Error locating resources for: " + expression, e);
-                }
-            }
-        } catch (IOException | RuntimeException e) {
-            LOG.log(Level.SEVERE, "Error locating resources for: " + expression, e);
-        }
-        return result;
-    }
-
-
-    /**
-     * Find all resources in jar files that match the given location pattern
-     * via the Ant-style PathMatcher.
-     *
-     * @param rootDirResource the root directory as Resource
-     * @param subPattern      the sub pattern to match (below the root directory)
-     * @return the Set of matching Resource instances
-     * @throws java.io.IOException in case of I/O errors
-     * @throws java.net.URISyntaxException in case of URL-related errors
-     * @see java.net.JarURLConnection
-     */
-    protected Collection<URL> doFindPathMatchingJarResources(URL rootDirResource, String subPattern)
-            throws IOException, URISyntaxException {
-        subPattern = subPattern.replace("*", ".*").replace("?", ".?").replace(".*.*", ".*");
-        URLConnection con = rootDirResource.toURI().toURL().openConnection();
-        JarFile jarFile;
-        boolean newJarFile = false;
-        String jarFileUrl;
-        String rootEntryPath;
-        boolean isFileExpression = !subPattern.contains("/");
-
-        if (con instanceof JarURLConnection) {
-            JarURLConnection jarCon = (JarURLConnection) con;
-            jarCon.setUseCaches(false);
-            jarFile = jarCon.getJarFile();
-            jarFileUrl = jarCon.getJarFileURL().toExternalForm();
-            JarEntry jarEntry = jarCon.getJarEntry();
-            rootEntryPath = (jarEntry != null ? jarEntry.getName() : "");
-        } else {
-            // No JarURLConnection -> need to resort to URL file parsing.
-            // We'll assume URLs of the format "jar:path!/entry", with the protocol
-            // being arbitrary as long as following the entry format.
-            // We'll also handle paths with and without leading "file:" prefix.
-            String urlFile = rootDirResource.toURI().toURL().getFile();
-            int separatorIndex = urlFile.indexOf(JAR_URL_SEPARATOR);
-            jarFileUrl = urlFile.substring(0, separatorIndex);
-            if (jarFileUrl.startsWith("file:")) {
-                jarFileUrl = jarFileUrl.substring("file:".length());
-            }
-            jarFile = new JarFile(jarFileUrl);
-            newJarFile = true;
-            jarFileUrl = "file:" + jarFileUrl;
-            rootEntryPath = urlFile.substring(separatorIndex + JAR_URL_SEPARATOR.length());
-        }
-
-        try {
-            if (LOG.isLoggable(Level.FINEST)) {
-                LOG.finest("Looking for matching resources in jar file [" + jarFileUrl + "]");
-            }
-            if (!rootEntryPath.isEmpty() && !rootEntryPath.endsWith("/")) {
-                // Root entry path must end with slash for correct matching
-                rootEntryPath = rootEntryPath + '/';
-            }
-            Collection<URL> result = new ArrayList<>(10);
-            for (Enumeration<JarEntry> entries = jarFile.entries(); entries.hasMoreElements(); ) {
-                JarEntry entry = entries.nextElement();
-                String entryPath = entry.getName();
-                if (entryPath.startsWith(rootEntryPath)) {
-                    String relativePath = entryPath.substring(rootEntryPath.length());
-                    if (relativePath.contains("/") && isFileExpression) {
-                        continue;
-                    }
-                    if (relativePath.matches(subPattern)) {
-                        URL url = createRelativeFrom(rootDirResource, relativePath);
-                        if(!result.contains(url)) {
-                            result.add(url);
-                        }
-                    }
-                }
-            }
-            return result;
-        } finally {
-            // Close jar file, but only if freshly obtained -
-            // not from JarURLConnection, which might cache the file reference.
-            if (newJarFile) {
-                jarFile.close();
-            }
-        }
-    }
-
-    /**
-     * Creates a new URL based on the given root path and the relative path to be added.
-     *
-     * @param url          the root, not null
-     * @param relativePath the relative path to be added, not null
-     * @return the new URL instance
-     * @throws MalformedURLException
-     */
-    private URL createRelativeFrom(URL url, String relativePath)
-            throws MalformedURLException {
-        String rootDirResource = url.toExternalForm();
-        if (relativePath.startsWith("/")) {
-            relativePath = relativePath.substring(1);
-        }
-        if (!rootDirResource.endsWith("/")) {
-            rootDirResource = rootDirResource + '/';
-        }
-        return new URL(rootDirResource + relativePath);
-    }
-
-
-    /**
-     * Small check if a given URL is a jar file URL.
-     *
-     * @param url the URL to check, not null.
-     * @return true if the URL has one of the following protocols: jar, zip, vfszip, wsjar, code-source.
-     */
-    private boolean isJarFile(URL url) {
-        String protocol = Objects.requireNonNull(url).getProtocol();
-        return (PROTOCOL_JAR.equals(protocol) ||
-                PROTOCOL_ZIP.equals(protocol) ||
-                PROTOCOL_VFSZIP.equals(protocol) ||
-                PROTOCOL_WSJAR.equals(protocol) ||
-                (PROTOCOL_CODE_SOURCE.equals(protocol) && url.getPath().contains(JAR_URL_SEPARATOR)));
-    }
-
-    /**
-     * Creates a file from an URL.
-     *
-     * @param resourceUrl the url, not null.
-     * @return a new file instance. The instance still may not exist. if the url's protocol is not 'file', {@code null}
-     * is returned.
-     */
-    private File getFile(URL resourceUrl) {
-        Objects.requireNonNull(resourceUrl, "Resource URL must not be null");
-        if (!"file".equals(resourceUrl.getProtocol())) {
-            return null;
-        }
-        try {
-            return new File(resourceUrl.toURI().getSchemeSpecificPart());
-        } catch (Exception ex) {
-            // Fallback for URLs that are not valid URIs (should hardly ever happen).
-            return new File(resourceUrl.getFile());
-        }
-    }
-
-    /**
-     * Method that collects resources from a JBoss classloading system using Vfs.
-     * @param rootResource the root resource for evaluating its children.
-     * @param locationPattern the sub pattern that all children must mach, so they are selected.
-     * @return the resources found, never null.
-     * @throws IOException
-     */
-    private static Collection<URL> findMatchingVfsResources(
-            URL rootResource, String locationPattern) throws IOException {
-        Object root = VfsSupport.getRoot(rootResource);
-        PatternVfsVisitor visitor =
-                new PatternVfsVisitor(VfsSupport.getPath(root), locationPattern);
-        VfsSupport.visit(root, visitor);
-        return visitor.getResources();
-    }
-
-    /**
-     * Simple dynamic visitor implementation used for evaluating paths from a JBoss Vfs system.
-     */
-    private static class PatternVfsVisitor implements InvocationHandler {
-        /**
-         * The regex pattern to match agains all child resources of the root path against.
-         */
-        private final String subPattern;
-        /**
-         * The resource path before yny placeholders/whitespaces are occurring.
-         */
-        private final String rootPath;
-        /**
-         * THe resources found so far.
-         */
-        private final List<URL> resources = new LinkedList<>();
-
-        /**
-         * Creates a new visitor for cfs resources.
-         *
-         * @param rootPath   the root path, until any patterns are occurring.
-         * @param subPattern the sub pattern for looking for.
-         */
-        public PatternVfsVisitor(String rootPath, String subPattern) {
-            this.subPattern = subPattern;
-            this.rootPath = (rootPath.length() == 0 || rootPath.endsWith("/") ? rootPath : rootPath + "/");
-        }
-
-        /**
-         * Method called by visitor proxy.
-         *
-         * @param proxy  the proxy instance.
-         * @param method the method called.
-         * @param args   any arguments.
-         * @return the result.
-         * @throws Throwable in case something goes wrong.
-         */
-        @Override
-        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-            String methodName = method.getName();
-            if (Object.class.equals(method.getDeclaringClass())) {
-                if (methodName.equals("equals")) {
-                    // Only consider equal when proxies are identical.
-                    return (proxy == args[0]);
-                } else if (methodName.equals("hashCode")) {
-                    return System.identityHashCode(proxy);
-                }
-            } else if ("getAttributes".equals(methodName)) {
-                return VfsSupport.getVisitorAttributes();
-            } else if ("visit".equals(methodName)) {
-                visit(args[0]);
-                return null;
-            } else if ("toString".equals(methodName)) {
-                return toString();
-            }
-
-            throw new IllegalStateException("Unexpected method invocation: " + method);
-        }
-
-        /**
-         * Visitor method.
-         *
-         * @param vfsResource the vfsResource object.
-         */
-        public void visit(Object vfsResource) {
-            String subPath = VfsSupport.getPath(vfsResource).substring(this.rootPath.length());
-            if (subPath.matches(this.subPattern)) {
-                try {
-                    this.resources.add(VfsSupport.getURL(vfsResource));
-                } catch (Exception e) {
-                    LOG.log(Level.WARNING, "Failed to convert vfs resource to URL: " + vfsResource, e);
-                }
-            }
-        }
-
-        /**
-         * Access the resources found from Vfs during last visit.
-         *
-         * @return the resources found, not null.
-         */
-        public Collection<URL> getResources() {
-            return this.resources;
-        }
-
-        @Override
-        public String toString() {
-            return "sub-pattern: " + this.subPattern + ", resources: " + this.resources;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/DefaultResourceResolver.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/DefaultResourceResolver.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/DefaultResourceResolver.java
deleted file mode 100644
index 99e7b3f..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/DefaultResourceResolver.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import org.apache.tamaya.resource.BaseResourceResolver;
-import org.apache.tamaya.resource.ResourceLocator;
-import org.apache.tamaya.spi.ServiceContextManager;
-
-import javax.annotation.Priority;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.logging.Logger;
-
-/**
- * Simple default implementation of the resource loader, which does only support direct references to files.
- */
-@Priority(0)
-public class DefaultResourceResolver extends BaseResourceResolver {
-
-    private static final Logger LOG = Logger.getLogger(DefaultResourceResolver.class.getName());
-
-    @Override
-    public List<URL> getResources(ClassLoader classLoader, Collection<String> expressions) {
-        List<URL> resources = new ArrayList<>();
-        for (String expression : expressions) {
-            for(ResourceLocator locator: getResourceLocators()){
-                Collection<URL> found = locator.lookup(classLoader, expression);
-                if(!found.isEmpty()) {
-                    resources.addAll(found);
-                    break;
-                }
-            }
-        }
-        return resources;
-    }
-
-    @Override
-    public Collection<ResourceLocator> getResourceLocators() {
-        return ServiceContextManager.getServiceContext().getServices(ResourceLocator.class);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileCollector.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileCollector.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileCollector.java
deleted file mode 100644
index eccb873..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileCollector.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-import java.util.logging.Logger;
-
-/**
- * Collector that searches files based on ant styled patterns. For example the following patterns would be matched:
- * <pre>
- *     file:C:/temp/*.txt
- *     file:C:\**\*.ini
- *     C:\Programs\**&#47;*.ini
- *     /user/home/A*b101_?.pid
- *     /var/logs&#47;**&#47;*.log
- * </pre>
- */
-public class FileCollector {
-    /** The prefix used to explicitly select this collector. */
-    public static final String FILE_PREFIX = "file:";
-
-    /** The logger instance. */
-    private static final Logger LOG = Logger.getLogger(FileCollector.class.getName());
-
-    /**
-     * private constructor.
-     */
-    private FileCollector() {
-    }
-
-    /**
-     * Collects the files given the expression.
-     * @param expression the expression in Ant-styled format, not null.
-     * @return the URLs found.
-     */
-    public static Collection<URL> collectFiles(String expression) {
-        expression = expression.replace("\\", "/");
-        Locator locator = Locator.of(expression);
-        List<URL> result = new ArrayList<>();
-        String rootPath = locator.getRootPath();
-        if (rootPath.startsWith(FILE_PREFIX)) {
-            rootPath = rootPath.substring(FILE_PREFIX.length());
-        }
-        File file = new File(rootPath);
-        if (file.exists()) {
-            List<String> subTokens = locator.getSubPathTokens();
-            result.addAll(traverseAndSelectFromChildren(file, subTokens, 0));
-        }
-        return result;
-    }
-
-    /**
-     * Internal method to traverse the file system down, hereby comparing the new path elements with the
-     * elements given by {@code subTokens}, starting at the given {@code tokenIndex}.
-     * @param dir the directory to start
-     * @param subTokens the overall subtoken to be analyzed
-     * @param tokenIndex the index where in the token list to start comparing
-     * @return the URLs matching the tokens
-     */
-    static Collection<URL> traverseAndSelectFromChildren(File dir, List<String> subTokens, int tokenIndex) {
-        if (tokenIndex >= subTokens.size() || dir.isFile() || !dir.isDirectory()) {
-            return Collections.emptyList();
-        }
-        List<URL> result = new ArrayList<>();
-        String token = subTokens.get(tokenIndex);
-        if (token.equals("**")) {
-            result.addAll(traverseAndSelectFromChildren(dir, getSubExpression(subTokens, tokenIndex + 1)));
-        } else {
-            token = token.replace("*", ".*").replace("?", ".?");
-            File[] files = dir.listFiles();
-            if (tokenIndex == subTokens.size() - 1) {
-                // select files!
-                if(files!=null) {
-                    for (File f : files) {
-                        if (f.isFile() && f.getName().matches(token)) {
-                            result.add(getURL(f));
-                        }
-                    }
-                }
-            } else {
-                // check directory pattern
-                if(files!=null) {
-                    for (File f : files) {
-                        if (f.isDirectory() && f.getName().matches(token)) {
-                            result.addAll(traverseAndSelectFromChildren(f, subTokens, tokenIndex + 1));
-                        }
-                    }
-                }
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Internal method to traverse the file system and comparing all child file names with the given expression.
-     * @param file the root directory
-     * @param expression the regular expression to match
-     * @return the URLs matching the expression
-     */
-    static Collection<URL> traverseAndSelectFromChildren(File file, String expression) {
-        List<URL> result = new ArrayList<>();
-        File[] files = file.listFiles();
-        if(files==null){
-            return result;
-        }
-        for (File childFile : files) {
-            if (childFile.isFile()) {
-                if (childFile.getName().matches(expression)) {
-                    try {
-                        result.add(getURL(childFile));
-                    } catch (Exception e) {
-                        LOG.warning("File not convertible to URL: " + childFile);
-                    }
-                }
-            } else if (childFile.isDirectory()) {
-                result.addAll(traverseAndSelectFromChildren(childFile, expression));
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Get an URL from a file.
-     *
-     * @param file the file, not null.
-     * @return the URL, never null.
-     * @throws java.lang.IllegalStateException if it fails to create the URL
-     */
-    private static URL getURL(File file) {
-        Objects.requireNonNull(file);
-        try {
-            return file.toURI().toURL();
-        } catch (Exception e) {
-            throw new IllegalStateException("Failed to create URL from file: " + file);
-        }
-    }
-
-    /**
-     * Constructs a sub expression, using the tokens from {@code subTokens} starting at index {@code startIndex}.
-     *
-     * @param subTokens  the token list, not null
-     * @param startIndex the start index from where tokens should be taken to produce the path.
-     * @return the constructed path, never null.
-     */
-    private static String getSubExpression(List<String> subTokens, int startIndex) {
-        StringBuilder b = new StringBuilder();
-        for (int i = startIndex; i < subTokens.size(); i++) {
-            b.append(subTokens.get(i));
-            b.append('/');
-        }
-        if (b.length() > 0) {
-            b.setLength(b.length() - 1);
-        }
-        return b.toString().replaceAll("\\*", ".*").replaceAll("\\?", ".?");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileResourceLocator.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileResourceLocator.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileResourceLocator.java
deleted file mode 100644
index a58b414..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/FileResourceLocator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import org.apache.tamaya.resource.ResourceLocator;
-
-import javax.annotation.Priority;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.logging.Logger;
-
-/**
- * {@link ResourceLocator} for locating local files.
- */
-@Priority(80)
-public class FileResourceLocator implements ResourceLocator{
-    /**
-     * The logger used.
-     */
-    private static final Logger LOG = Logger.getLogger(FileResourceLocator.class.getName());
-
-    /**
-     * Tries to evaluate the location passed by loading from the classloader.
-     * @param classLoader the class loader to use
-     * @param expression the path expression
-     * @return the resources found.
-     */
-    @Override
-    public Collection<URL> lookup(ClassLoader classLoader, String expression) {
-        List<URL> resources = new ArrayList<>();
-        try {
-            File file = new File(expression);
-            if (file.exists()) {
-                resources.add(file.toURI().toURL());
-            }
-            return resources;
-        } catch (IOException | RuntimeException e) {
-            LOG.finest("Failed to load resource from file: " + expression);
-            return Collections.emptySet();
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "FileResourceLocator -> file:<expression>, e.g. file:./config/**/*.xml";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
deleted file mode 100644
index 0c757fa..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/Locator.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Small helper class that manages the path parts of a location expression.
- */
-final class Locator {
-    /**
-     * The tokenized location expression.
-     */
-    private final List<String> tokens;
-
-    /**
-     * Creates a new instances based on the tokenized expression.
-     *
-     * @param tokens the tokenized expression, not null.
-     */
-    Locator(List<String> tokens) {
-        this.tokens = tokens;
-    }
-
-    /**
-     * Creates a new instance of the corresponding expression.
-     *
-     * @param expression the location expression, not null.
-     * @return the tokenized instance.
-     */
-    public static Locator of(String expression) {
-        List<String> expressions = new ArrayList<>();
-        for (String expr : expression.split("/")) {
-            if(expr.length()==0) {
-                expressions.add("/");
-            } else{
-                expressions.add(expr);
-            }
-        }
-        return new Locator(expressions);
-    }
-
-    /**
-     * Access the root path, which is the location expression, before any wildcards or placeholders are used.
-     * It is used as the entry point into the file system or for accessing base classpath resources, before
-     * further analysis on the file or jar filesystem can be performed.
-     *
-     * @return the root path, never null.
-     */
-    public String getRootPath() {
-        StringBuilder sj = new StringBuilder();
-        for (String token : this.tokens) {
-            if (containsPlaceholder(token)) {
-                break;
-            } else {
-                if(!(sj.length()==0)) {
-                    sj.append('/');
-                }
-                sj.append(token);
-            }
-        }
-        return sj.toString();
-    }
-
-    /**
-     * Return the sub expression path, which contains the second part of the expression, starting with a placeholder
-     * or wildcard token.
-     *
-     * @return the sub expression part, never null.
-     */
-    public String getSubPath() {
-        StringBuilder sj = new StringBuilder();
-        for (String token : getSubPathTokens()) {
-            if(!(sj.length()==0)) {
-                sj.append('/');
-            }
-            sj.append(token);
-        }
-        return sj.toString();
-    }
-
-    /**
-     * This method returns the single tokenized form of the sub expression.
-     *
-     * @return the tokenized version of the sub path.
-     * @see #getSubPath()
-     */
-    public List<String> getSubPathTokens() {
-        List<String> subTokens = new ArrayList<>();
-        boolean subTokensStarted = false;
-        for (String token : tokens) {
-            if(subTokensStarted){
-                subTokens.add(token);
-            } else if (containsPlaceholder(token)) {
-                subTokensStarted = true;
-                subTokens.add(token);
-            }
-        }
-        return subTokens;
-    }
-
-    /**
-     * Access the full reconstructed path. In most cases this should match the original expression.
-     *
-     * @return the full expression path, never null.
-     */
-    public String getPath() {
-        StringBuilder sj = new StringBuilder();
-        for (String token : tokens) {
-            if(!(sj.length()==0)) {
-                sj.append('/');
-            }
-            sj.append(token);
-        }
-        return sj.toString();
-    }
-
-    /**
-     * Short method that checks for '*' and '?' chars.
-     *
-     * @param token the token to check, not null
-     * @return true, if it contains wildcard characters.
-     */
-    private boolean containsPlaceholder(String token) {
-        return token.contains("*") || token.contains("?");
-    }
-
-    /**
-     * Return the expressions' path.
-     *
-     * @return the locator path.
-     */
-    @Override
-    public String toString() {
-        return "Locator: " + getPath();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/PathResourceLocator.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/PathResourceLocator.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/PathResourceLocator.java
deleted file mode 100644
index e649e3b..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/PathResourceLocator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import org.apache.tamaya.resource.ResourceLocator;
-
-import javax.annotation.Priority;
-import java.net.URL;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.logging.Logger;
-
-/**
- * Created by atsticks on 01.03.16.
- */
-@Priority(100)
-public class PathResourceLocator implements ResourceLocator{
-    /**
-     * The logger used.
-     */
-    private static final Logger LOG = Logger.getLogger(PathResourceLocator.class.getName());
-
-    /**
-     * Tries to evaluate the location passed by Ant path matching.
-     * @param classLoader the class loader to use
-     * @param expression the path expression
-     * @return true, if the expression could be resolved.
-     */
-    @Override
-    public Collection<URL> lookup(ClassLoader classLoader, String expression) {
-        try {
-            // 1: try file path
-            Collection<URL> found = FileCollector.collectFiles(expression);
-            if (found.isEmpty()) {
-                found = new ClasspathCollector(classLoader).collectFiles(expression);
-            }
-            return found;
-        } catch (RuntimeException e) {
-            LOG.finest("Failed to load resource from CP: " + expression);
-            return Collections.emptySet();
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "PathResourceLocator -> <fileExpression>,<classpathExpression>, e.g. /**/*.xml";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/URLResourceLocator.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/URLResourceLocator.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/URLResourceLocator.java
deleted file mode 100644
index 53ef00a..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/URLResourceLocator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import org.apache.tamaya.resource.ResourceLocator;
-
-import javax.annotation.Priority;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.logging.Logger;
-
-/**
- * {@link ResourceLocator} for locating URL resources..
- */
-@Priority(70)
-public class URLResourceLocator implements ResourceLocator{
-    /**
-     * The logger used.
-     */
-    private static final Logger LOG = Logger.getLogger(URLResourceLocator.class.getName());
-
-    /**
-     * Tries to evaluate the location passed by loading from the classloader.
-     * @param classLoader the class loader to use
-     * @param expression the path expression
-     * @return the resources found.
-     */
-    @Override
-    public Collection<URL> lookup(ClassLoader classLoader, String expression) {
-        List<URL> resources = new ArrayList<>();
-        try {
-            URL url = new URL(expression);
-            resources.add(url);
-            return resources;
-        } catch (IOException | RuntimeException e) {
-            LOG.finest("Failed to load resource from file: " + expression);
-            return Collections.emptySet();
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "URLResourceLocator -> <url>";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/VfsSupport.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/VfsSupport.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/VfsSupport.java
deleted file mode 100644
index 7e75c99..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/VfsSupport.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Objects;
-
-/**
- * Internal support class dealing with JBoss VFS in the classpath.
- * <p>
- * This code is compatible with JBoss AS 6+ and JBoss AS 7 and
- * WildFly 8.
- */
-class VfsSupport {
-
-    private static final String VFS3_PKG = "org.jboss.vfs.";
-    private static final String VFS_PROTOCOL = "VFS";
-
-    private static Method methodGetRootUrl = null;
-    private static Method methodToUrl;
-    private static Method methodGetPathName;
-    private static Class<?> fileVisitorInterface;
-    private static Method methodVisit;
-    private static Field visitorAttributesField = null;
-    private static Method methodGetPhysicalFile = null;
-
-    /**
-     * Private constructor.
-     */
-    private VfsSupport(){}
-
-    /*
-     * Initialize glue reflection code for communicating with VFS systems.
-     */
-    static {
-        ClassLoader loader = VfsSupport.class.getClassLoader();
-        try {
-            Class<?> vfsClass = loader.loadClass(VFS3_PKG + VFS_PROTOCOL);
-            methodGetRootUrl = findMethod(vfsClass, "getChild", URL.class);
-            Class<?> virtualFile = loader.loadClass(VFS3_PKG + "VirtualFile");
-            methodToUrl = findMethod(virtualFile, "toURL");
-            methodGetPathName = findMethod(virtualFile, "getPathName");
-            methodGetPhysicalFile = findMethod(virtualFile, "getPhysicalFile");
-            fileVisitorInterface = loader.loadClass(VFS3_PKG + "VirtualFileVisitor");
-            methodVisit = findMethod(virtualFile, "visit", fileVisitorInterface);
-            Class<?> visitorAttributesClass = loader.loadClass(VFS3_PKG + "VisitorAttributes");
-            visitorAttributesField = findField(visitorAttributesClass, "RECURSE");
-        } catch (ClassNotFoundException ex) {
-            throw new IllegalStateException("JBoss VFS not available.", ex);
-        }
-    }
-
-    /**
-     * Visit a VFS resource with the given visitor, modeled as dynamic {@link java.lang.reflect.InvocationHandler}.
-     *
-     * @param resource the resource
-     * @param visitor  the visitor.
-     * @throws IOException
-     */
-    static void visit(Object resource, InvocationHandler visitor) throws IOException {
-        Object visitorProxy = Proxy.newProxyInstance(
-                fileVisitorInterface.getClassLoader(),
-                new Class<?>[]{fileVisitorInterface}, visitor);
-        invokeVfsMethod(methodVisit, resource, visitorProxy);
-    }
-
-    /**
-     * Helper method to invoke an operation on VFS.
-     *
-     * @param method the method to invoke
-     * @param target the target instance
-     * @param args   any arguments
-     * @return the result
-     * @throws IOException if something fails.
-     */
-    private static Object invokeVfsMethod(Method method, Object target, Object... args) throws IOException {
-        try {
-            return method.invoke(target, args);
-        } catch (Exception ex) {
-            throw new IOException("Failed to evaluated method: " + method, ex);
-        }
-
-    }
-
-    /**
-     * Transform a VFS resource into an URL.
-     *
-     * @param vfsResource the cfw resource, not null
-     * @return the corresponding URL
-     * @throws IOException
-     */
-    static URL getURL(Object vfsResource) throws IOException {
-        return (URL) invokeVfsMethod(methodToUrl, vfsResource);
-    }
-
-    /**
-     * Get a to root VFS resource for the given URL.
-     *
-     * @param url the url
-     * @return the corresponding VFS resource.
-     * @throws IOException
-     */
-    static Object getRelative(URL url) throws IOException {
-        return invokeVfsMethod(methodGetRootUrl, null, url);
-    }
-
-    /**
-     * Transform the given VFS resource of a file.
-     *
-     * @param vfsResource the VFS resource
-     * @return the file.
-     * @throws IOException
-     */
-    static File getFile(Object vfsResource) throws IOException {
-        return (File) invokeVfsMethod(methodGetPhysicalFile, vfsResource);
-    }
-
-    /**
-     * Convert the given URL to the correspinoding root URL.
-     *
-     * @param url the url
-     * @return the root resource.
-     * @throws IOException
-     */
-    static Object getRoot(URL url) throws IOException {
-        return invokeVfsMethod(methodGetRootUrl, null, url);
-    }
-
-    /**
-     * Access the attributes from the current visitor context.
-     *
-     * @return the attributes.
-     */
-    static Object getVisitorAttributes() {
-        return readField(visitorAttributesField, null);
-    }
-
-    /**
-     * Access the corresponding path to the given VFS resource.
-     *
-     * @param resource the VFS resource
-     * @return the corresponding path.
-     */
-    static String getPath(Object resource) {
-        try {
-            return (String) methodGetPathName.invoke(resource);
-        } catch (Exception e) {
-            throw new IllegalStateException("Failed to get path name - " + resource, e);
-        }
-    }
-
-
-    /**
-     * Attempt to find a {@link Method} on the supplied class with the supplied name
-     * and parameter types. Searches all superclasses up to {@code Object}.
-     * <p>Returns {@code null} if no {@link Method} can be found.
-     *
-     * @param clazz      the class to introspect
-     * @param name       the name of the method
-     * @param paramTypes the parameter types of the method
-     *                   (may be {@code null} to indicate any signature)
-     * @return the Method object, or {@code null} if none found
-     */
-    private static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {
-        Objects.requireNonNull(clazz, "Class must not be null");
-        Objects.requireNonNull(name, "Method name must not be null");
-        Class<?> searchType = clazz;
-        while (searchType != null) {
-            Method[] methods = (searchType.isInterface() ? searchType.getMethods() : searchType.getDeclaredMethods());
-            for (Method method : methods) {
-                if (name.equals(method.getName()) &&
-                        (paramTypes == null || Arrays.equals(paramTypes, method.getParameterTypes()))) {
-                    return method;
-                }
-            }
-            searchType = searchType.getSuperclass();
-        }
-        return null;
-    }
-
-
-    /**
-     * Get the field represented by the supplied {@link Field field object} on the
-     * specified {@link Object target object}. In accordance with {@link Field#get(Object)}
-     * semantics, the returned value is automatically wrapped if the underlying field
-     * has a primitive type.
-     * <p>Thrown exceptions are rethrown as {@link IllegalStateException}.
-     *
-     * @param field  the field to get
-     * @param target the target object from which to get the field
-     * @return the field's current value
-     */
-    private static Object readField(Field field, Object target) {
-        try {
-            if (!field.isAccessible()) {
-                field.setAccessible(true);
-            }
-            return field.get(target);
-        } catch (Exception e) {
-            throw new IllegalStateException(
-                    "Failed to read field: " + field.toGenericString(), e);
-        }
-    }
-
-    /**
-     * Attempt to find a {@link Field field} on the supplied {@link Class} with the
-     * supplied {@code name}. Searches all superclasses up to {@link Object}.
-     *
-     * @param clazz the class to introspect
-     * @param name  the name of the field
-     * @return the corresponding Field object, or {@code null} if not found
-     */
-    private static Field findField(Class<?> clazz, String name) {
-        Objects.requireNonNull(clazz, "Class must not be null");
-        Objects.requireNonNull(name, "Name must not be null.");
-        Class<?> searchType = clazz;
-        while (!Object.class.equals(searchType) && searchType != null) {
-            Field[] fields = searchType.getDeclaredFields();
-            for (Field field : fields) {
-                if (name.equals(field.getName())) {
-                    return field;
-                }
-            }
-            searchType = searchType.getSuperclass();
-        }
-        return null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/package-info.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/package-info.java b/modules/resources/src/main/java/org/apache/tamaya/resource/internal/package-info.java
deleted file mode 100644
index b166853..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/internal/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * Contains the default implementation of the resources module, including special support for
- * JBoss app servers (VFS).
- */
-package org.apache.tamaya.resource.internal;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/java/org/apache/tamaya/resource/package-info.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/java/org/apache/tamaya/resource/package-info.java b/modules/resources/src/main/java/org/apache/tamaya/resource/package-info.java
deleted file mode 100644
index 37678a8..0000000
--- a/modules/resources/src/main/java/org/apache/tamaya/resource/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-/**
- * Contains the resources module API.
- */
-package org.apache.tamaya.resource;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/resources/META-INF/services/org.apache.tamaya.resource.ResourceLocator
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/resources/META-INF/services/org.apache.tamaya.resource.ResourceLocator b/modules/resources/src/main/resources/META-INF/services/org.apache.tamaya.resource.ResourceLocator
deleted file mode 100644
index 6d5b094..0000000
--- a/modules/resources/src/main/resources/META-INF/services/org.apache.tamaya.resource.ResourceLocator
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy current the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.resource.internal.ClassPathResourceLocator
-org.apache.tamaya.resource.internal.FileResourceLocator
-org.apache.tamaya.resource.internal.PathResourceLocator
-org.apache.tamaya.resource.internal.URLResourceLocator
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/main/resources/META-INF/services/org.apache.tamaya.resource.ResourceResolver
----------------------------------------------------------------------
diff --git a/modules/resources/src/main/resources/META-INF/services/org.apache.tamaya.resource.ResourceResolver b/modules/resources/src/main/resources/META-INF/services/org.apache.tamaya.resource.ResourceResolver
deleted file mode 100644
index aacd0d5..0000000
--- a/modules/resources/src/main/resources/META-INF/services/org.apache.tamaya.resource.ResourceResolver
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy current the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.tamaya.resource.internal.DefaultResourceResolver
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/test/java/org/apache/tamaya/resource/AbstractPathPropertySourceProviderTest.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/test/java/org/apache/tamaya/resource/AbstractPathPropertySourceProviderTest.java b/modules/resources/src/test/java/org/apache/tamaya/resource/AbstractPathPropertySourceProviderTest.java
deleted file mode 100644
index 8fe1b2b..0000000
--- a/modules/resources/src/test/java/org/apache/tamaya/resource/AbstractPathPropertySourceProviderTest.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource;
-
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertyValue;
-import org.apache.tamaya.spi.PropertyValueBuilder;
-import org.junit.Test;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-public class AbstractPathPropertySourceProviderTest {
-
-    private final AbstractPathPropertySourceProvider myProvider = new AbstractPathPropertySourceProvider("*.properties") {
-        @Override
-        protected Collection<PropertySource> getPropertySources(URL url) {
-            List<PropertySource> result = new ArrayList<>();
-            result.add(new EmptyPropertySource());
-            return result;
-        }
-    };
-
-    @Test
-    public void testGetPropertySources() throws Exception {
-        assertNotNull(myProvider.getPropertySources());
-    }
-
-    @Test
-    public void testCreatePropertiesPropertySource() throws Exception {
-        PropertySource ps = AbstractPathPropertySourceProvider.createPropertiesPropertySource(
-                ClassLoader.getSystemClassLoader().getResource("test.properties")
-        );
-        assertNotNull(ps);
-        assertTrue(ps.getProperties().isEmpty());
-    }
-
-    private static final class EmptyPropertySource implements PropertySource {
-        /**
-         * Lookup order:
-         * TODO rethink whole default PropertySources and ordering:
-         * TODO introduce default values or constants for ordinals
-         * <ol>
-         * <li>System properties (ordinal 400)</li>
-         * <li>Environment properties (ordinal 300)</li>
-         * <li>JNDI values (ordinal 200)</li>
-         * <li>Properties file values (/META-INF/applicationConfiguration.properties) (ordinal 100)</li>
-         * </ol>
-         * <p/>
-         * <p><b>Important Hints for custom implementations</b>:</p>
-         * <p>
-         * If a custom implementation should be invoked <b>before</b> the default implementations, use a value &gt; 400
-         * </p>
-         * <p>
-         * If a custom implementation should be invoked <b>after</b> the default implementations, use a value &lt; 100
-         * </p>
-         * <p/>
-         * <p>Reordering of the default order of the config-sources:</p>
-         * <p>Example: If the properties file/s should be used <b>before</b> the other implementations,
-         * you have to configure an ordinal &gt; 400. That means, you have to add e.g. deltaspike_ordinal=401 to
-         * /META-INF/apache-deltaspike.properties . Hint: In case of property files every file is handled as independent
-         * config-source, but all of them have ordinal 400 by default (and can be reordered in a fine-grained manner.</p>
-         *
-         * @return the 'importance' aka ordinal of the configured values. The higher, the more important.
-         */
-        public int getOrdinal() {
-            PropertyValue configuredOrdinal = get(TAMAYA_ORDINAL);
-            if (configuredOrdinal != null) {
-                try {
-                    return Integer.parseInt(configuredOrdinal.getValue());
-                } catch (Exception e) {
-                    Logger.getLogger(getClass().getName()).log(Level.WARNING,
-                            "Configured Ordinal is not an int number: " + configuredOrdinal, e);
-                }
-            }
-            return getDefaultOrdinal();
-        }
-
-        /**
-         * Returns the  default ordinal used, when no ordinal is set, or the ordinal was not parseable to an int value.
-         *
-         * @return the  default ordinal used, by default 0.
-         */
-        public int getDefaultOrdinal() {
-            return 0;
-        }
-
-        @Override
-        public String getName() {
-            return "<empty>";
-        }
-
-        @Override
-        public PropertyValue get(String key) {
-            return null;
-        }
-
-        @Override
-        public Map<String, String> getProperties() {
-            return Collections.emptyMap();
-        }
-
-        @Override
-        public boolean isScannable() {
-            return true;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/ClasspathCollectorTest.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/ClasspathCollectorTest.java b/modules/resources/src/test/java/org/apache/tamaya/resource/internal/ClasspathCollectorTest.java
deleted file mode 100644
index ccdc7bc..0000000
--- a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/ClasspathCollectorTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import org.junit.Ignore;
-
-import java.net.URL;
-import java.util.Collection;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * This tests is using testing the classpath collector functionality, either by accessing/searching entries
- * from the java.annotation jar as well from the current (file-based classpath).
- */
-@Ignore
-// Tests work within IDE, but not with maven...
-public class ClasspathCollectorTest {
-
-    @org.junit.Test
-    public void testCollectAllClasses() throws Exception {
-        ClasspathCollector cpc = new ClasspathCollector(ClassLoader.getSystemClassLoader());
-        Collection<URL> found = cpc.collectFiles("classpath:javax/annotation/*.class");
-        assertEquals(8, found.size()); // 7 ordinary, 1 inner class.
-        Collection<URL> found2 = cpc.collectFiles("javax/annotation/*.class");
-        assertEquals(found, found2);
-    }
-
-    @org.junit.Test
-    public void testCollectAllInPackage() throws Exception {
-        ClasspathCollector cpc = new ClasspathCollector(ClassLoader.getSystemClassLoader());
-        Collection<URL> found = cpc.collectFiles("classpath:javax/**/sql/*.class");
-        assertEquals(2, found.size());
-        Collection<URL> found2 = cpc.collectFiles("javax/**/sql/*.class");
-        assertEquals(found, found2);
-    }
-
-    @org.junit.Test
-    public void testCollectClassNames() throws Exception {
-        ClasspathCollector cpc = new ClasspathCollector(ClassLoader.getSystemClassLoader());
-        Collection<URL> found = cpc.collectFiles("classpath:javax/annotation/**/R*.class");
-        assertEquals(2, found.size());
-        Collection<URL> found2 = cpc.collectFiles("javax/annotation/**/R*.class");
-        assertEquals(found, found2);
-    }
-
-    @org.junit.Test
-    public void testCollectWithExpression() throws Exception {
-        ClasspathCollector cpc = new ClasspathCollector(ClassLoader.getSystemClassLoader());
-        Collection<URL> found = cpc.collectFiles("classpath:javax/annotation/R?so*.class");
-        assertEquals(3, found.size());
-        Collection<URL> found2 = cpc.collectFiles("javax/annotation/R?so*.class");
-        assertEquals(found, found2);
-    }
-
-    @org.junit.Test
-    public void testCollectResources() throws Exception {
-        ClasspathCollector cpc = new ClasspathCollector(ClassLoader.getSystemClassLoader());
-        Collection<URL> found = cpc.collectFiles("classpath:META-INF/maven/org.apache.geronimo.specs/**/*");
-        assertEquals(3, found.size());
-        Collection<URL> found2 = cpc.collectFiles("META-INF/maven/org.apache.geronimo.specs/**/*");
-        assertEquals(found, found2);
-    }
-
-    @org.junit.Test
-    public void testCollectResourcesFromLocalFSPath() throws Exception {
-        ClasspathCollector cpc = new ClasspathCollector(ClassLoader.getSystemClassLoader());
-        Collection<URL> found = cpc.collectFiles("classpath:resources_testroot/**/*.file");
-        assertEquals(7, found.size());
-        Collection<URL> found2 = cpc.collectFiles("resources_testroot/**/*.file");
-        assertEquals(found, found2);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/DefaultResourceResolverTest.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/DefaultResourceResolverTest.java b/modules/resources/src/test/java/org/apache/tamaya/resource/internal/DefaultResourceResolverTest.java
deleted file mode 100644
index 7729e2c..0000000
--- a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/DefaultResourceResolverTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Collection;
-
-import org.junit.Test;
-
-/**
- * Tests the {@link org.apache.tamaya.resource.internal.DefaultResourceResolver} using CP and FS path expressions.
- */
-public class DefaultResourceResolverTest {
-
-    private final DefaultResourceResolver resolver = new DefaultResourceResolver();
-
-
-    @Test
-    public void testGetResources_CP() throws Exception {
-        Collection<URL> found = resolver.getResources("classpath:resources_testroot/**/*.file");
-        assertEquals(7, found.size());
-        Collection<URL> found2 = resolver.getResources("resources_testroot/**/*.file");
-        assertEquals(found, found2);
-    }
-
-    @Test
-    public void testGetResources_FS() throws Exception {
-        String resDir = getResourceDir();
-        Collection<URL> found = resolver.getResources("file:" + resDir + "/resources_testroot/aa?a/*.file");
-        assertEquals(5, found.size());
-        Collection<URL> found2 = resolver.getResources(resDir + "/resources_testroot/aa?a/*.file");
-        assertEquals(found, found2);
-    }
-
-    private String getResourceDir() throws URISyntaxException {
-        URL res = getClass().getResource("/resources_testroot/");
-        return new File(res.toURI()).getParentFile().getAbsolutePath();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/FileCollectorTest.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/FileCollectorTest.java b/modules/resources/src/test/java/org/apache/tamaya/resource/internal/FileCollectorTest.java
deleted file mode 100644
index ac4e41b..0000000
--- a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/FileCollectorTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import org.junit.Test;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Collection;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * Test for checking correct lookup using the filesystem.
- */
-public class FileCollectorTest {
-
-    private String getResourceDir() throws URISyntaxException {
-        URL res = getClass().getClassLoader().getResource("resources_testroot/");
-        if(res==null){
-            return null;
-        }
-        return new File(res.toURI()).getAbsolutePath();
-    }
-
-    @Test
-    public void testCollectResourcesFromLocalFSPath() throws Exception {
-        String resDir = getResourceDir();
-        Collection<URL> found = FileCollector.collectFiles("file:" + resDir + "/**/*.file");
-        assertEquals(7, found.size());
-        Collection<URL> found2 = FileCollector.collectFiles(resDir + "/**/*.file");
-        assertEquals(found, found2);
-    }
-
-    @Test
-    public void testCollectResourcesFromLocalFSPath_WithFolderPlaceholder() throws Exception {
-        String resDir = getResourceDir();
-        Collection<URL> found = FileCollector.collectFiles("file:" + resDir + "/aa?a/*.file");
-        assertEquals(5, found.size());
-        Collection<URL> found2 = FileCollector.collectFiles(resDir + "/aa?a/*.file");
-        assertEquals(found, found2);
-    }
-
-
-    @Test
-    public void testCollectResourcesFromLocalFSPath_WithFolderAny() throws Exception {
-        String resDir = getResourceDir();
-        Collection<URL> found = FileCollector.collectFiles("file:" + resDir + "/b*/b?/*.file");
-        assertEquals(1, found.size());
-        Collection<URL> found2 = FileCollector.collectFiles(resDir + "/b*/b?/*.file");
-        assertEquals(found, found2);
-    }
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/PathBasedPropertySourceProvider.java
----------------------------------------------------------------------
diff --git a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/PathBasedPropertySourceProvider.java b/modules/resources/src/test/java/org/apache/tamaya/resource/internal/PathBasedPropertySourceProvider.java
deleted file mode 100644
index 7ea9b4c..0000000
--- a/modules/resources/src/test/java/org/apache/tamaya/resource/internal/PathBasedPropertySourceProvider.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tamaya.resource.internal;
-
-import org.apache.tamaya.resource.AbstractPathPropertySourceProvider;
-import org.apache.tamaya.spi.PropertySource;
-import org.apache.tamaya.spi.PropertyValue;
-import org.apache.tamaya.spi.PropertyValueBuilder;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * Created by Anatole on 03.03.2015.
- */
-public class PathBasedPropertySourceProvider extends AbstractPathPropertySourceProvider{
-
-    public PathBasedPropertySourceProvider() {
-        super("META-INF/cfg/**/*.properties");
-    }
-
-    @Override
-    protected Collection<PropertySource> getPropertySources(URL url) {
-        List<PropertySource> list = new ArrayList<>();
-        Properties props = new Properties();
-        try(InputStream is = url.openStream()){
-            props.load(is);
-            list.add(new PropertiesBasedPropertySource(url.toString(), props));
-        }
-        catch(Exception e){
-            e.printStackTrace();
-            return null;
-        }
-        return list;
-    }
-
-
-    private final static class PropertiesBasedPropertySource implements PropertySource{
-
-        private final String name;
-        private final Map<String,String> properties = new HashMap<>();
-
-        public PropertiesBasedPropertySource(String name, Properties props) {
-            this.name = name;
-            for (Map.Entry en : props.entrySet()) {
-                this.properties.put(en.getKey().toString(), String.valueOf(en.getValue()));
-            }
-        }
-
-        @Override
-        public int getOrdinal() {
-            return 0;
-        }
-
-        @Override
-        public String getName() {
-            return name;
-        }
-
-        @Override
-        public PropertyValue get(String key) {
-            return PropertyValue.of(key,properties.get(key), getName());
-        }
-
-        @Override
-        public Map<String, String> getProperties() {
-            return properties;
-        }
-
-        @Override
-        public boolean isScannable() {
-            return false;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/test/resources/resources_testroot/aa_a/a1_1.file
----------------------------------------------------------------------
diff --git a/modules/resources/src/test/resources/resources_testroot/aa_a/a1_1.file b/modules/resources/src/test/resources/resources_testroot/aa_a/a1_1.file
deleted file mode 100644
index 7220975..0000000
--- a/modules/resources/src/test/resources/resources_testroot/aa_a/a1_1.file
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/359d3e4a/modules/resources/src/test/resources/resources_testroot/aa_a/a1_2.file
----------------------------------------------------------------------
diff --git a/modules/resources/src/test/resources/resources_testroot/aa_a/a1_2.file b/modules/resources/src/test/resources/resources_testroot/aa_a/a1_2.file
deleted file mode 100644
index 7220975..0000000
--- a/modules/resources/src/test/resources/resources_testroot/aa_a/a1_2.file
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
\ No newline at end of file



Mime
View raw message