// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/PluginException.java
// public class PluginException extends Exception {
// 
//     private Optional<DependencyProblem> dependencyProblem = Optional.empty();
// 
//     private Optional<PluginMetadata> pluginMetadata = Optional.empty();
// 
//     public PluginException(Exception e) {
//         super(e);
//     }
// 
//     public PluginException(String message) {
//         super(message);
//     }
// 
//     public PluginException(String message, Exception e) {
//         super(message, e);
//     }
// 
//     public PluginException withDependencyProblem(DependencyProblem dependencyProblem) {
//         this.dependencyProblem = Optional.ofNullable(dependencyProblem);
//         return this;
//     }
// 
//     public PluginException withPlugin(PluginMetadata pluginMetadata) {
//         this.pluginMetadata = Optional.ofNullable(pluginMetadata);
//         return this;
//     }
// 
//     /**
//      * Returns dependency problem if any
//      *
//      * @return dependency problem
//      */
//     public Optional<DependencyProblem> getDependencyProblem() {
//         return dependencyProblem;
//     }
// 
//     /**
//      * Returns plugin affected
//      *
//      * @return plugin metadata
//      */
//     public Optional<PluginMetadata> getPluginMetadata() {
//         return pluginMetadata;
//     }
// 
// }
// 
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/ResourcesScanner.java
// public interface ResourcesScanner {
// 
//     /**
//      * Does the scanning
//      *
//      * @param path depending on context can be a file or directory path
//      * @return a list of matching resources
//      * @throws org.meridor.stecker.PluginException when something goes wrong during resources scanning
//      */
//     List<Path> scan(Path path) throws PluginException;
// 
// }


import org.meridor.stecker.PluginException;
import org.meridor.stecker.interfaces.ResourcesScanner;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
package org.meridor.stecker.impl;



public class DefaultResourcesScanner implements ResourcesScanner {

    private final Path cacheDirectory;
    private final String[] patterns;

    public DefaultResourcesScanner(Path cacheDirectory, String[] patterns) {
        this.cacheDirectory = cacheDirectory;
        this.patterns = patterns;
    }

    @Override
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/PluginException.java
// public class PluginException extends Exception {
// 
//     private Optional<DependencyProblem> dependencyProblem = Optional.empty();
// 
//     private Optional<PluginMetadata> pluginMetadata = Optional.empty();
// 
//     public PluginException(Exception e) {
//         super(e);
//     }
// 
//     public PluginException(String message) {
//         super(message);
//     }
// 
//     public PluginException(String message, Exception e) {
//         super(message, e);
//     }
// 
//     public PluginException withDependencyProblem(DependencyProblem dependencyProblem) {
//         this.dependencyProblem = Optional.ofNullable(dependencyProblem);
//         return this;
//     }
// 
//     public PluginException withPlugin(PluginMetadata pluginMetadata) {
//         this.pluginMetadata = Optional.ofNullable(pluginMetadata);
//         return this;
//     }
// 
//     /**
//      * Returns dependency problem if any
//      *
//      * @return dependency problem
//      */
//     public Optional<DependencyProblem> getDependencyProblem() {
//         return dependencyProblem;
//     }
// 
//     /**
//      * Returns plugin affected
//      *
//      * @return plugin metadata
//      */
//     public Optional<PluginMetadata> getPluginMetadata() {
//         return pluginMetadata;
//     }
// 
// }
// 
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/ResourcesScanner.java
// public interface ResourcesScanner {
// 
//     /**
//      * Does the scanning
//      *
//      * @param path depending on context can be a file or directory path
//      * @return a list of matching resources
//      * @throws org.meridor.stecker.PluginException when something goes wrong during resources scanning
//      */
//     List<Path> scan(Path path) throws PluginException;
// 
// }


// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/impl/DefaultResourcesScanner.java
import org.meridor.stecker.PluginException;
import org.meridor.stecker.interfaces.ResourcesScanner;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;

package org.meridor.stecker.impl;



public class DefaultResourcesScanner implements ResourcesScanner {

    private final Path cacheDirectory;
    private final String[] patterns;

    public DefaultResourcesScanner(Path cacheDirectory, String[] patterns) {
        this.cacheDirectory = cacheDirectory;
        this.patterns = patterns;
    }

    @Override
    public List<Path> scan(Path pluginFile) throws PluginException {