All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fridujo.junit.extension.classpath.ClasspathContext Maven / Gradle / Ivy

The newest version!
package com.github.fridujo.junit.extension.classpath;

import java.util.Collections;
import java.util.Optional;
import java.util.Set;

import com.github.fridujo.junit.extension.classpath.maven.Maven;

class ClasspathContext {

    private Maven maven;

    Optional getMaven(PathElement path) {
        if (maven == null) {
            maven = Maven.from(path).orElse(null);
        }
        return Optional.ofNullable(maven);
    }

    Set listDependencies(PathElement path) {
        return getMaven(path).map(m -> m.listDependencies(path)).orElse(Collections.emptySet());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy