package org.carlspring.strongbox.storage.visitors;

import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;

/**
 * @author stodorov
 */
public class ArtifactPomVisitor
        extends SimpleFileVisitor<Path>
{

    private PathMatcher matcher;
    public ArrayList<Path> foundPaths = new ArrayList<>();

    public ArtifactPomVisitor()
    {
        matcher = FileSystems.getDefault().getPathMatcher("glob:*.pom");

    }

    @Override
    public FileVisitResult visitFile(Path file,
                                     BasicFileAttributes attr)
            throws IOException
    {

        Path name = file.getFileName();
        if (matcher.matches(name))
        {
            foundPaths.add(file);
        }

        return FileVisitResult.CONTINUE;
    }

}

@@ -314,16 +314,17 @@
 atcher;%0A
+%0A
     publ
@@ -371,24 +371,25 @@
 yList%3C%3E();%0A%0A
+%0A
     public A
@@ -487,17 +487,16 @@
 .pom%22);%0A
-%0A
     %7D%0A%0A 
@@ -654,15 +654,14 @@
 ion%0A
+
     %7B%0A
-%0A
     

Implement artifact metadata support