Java 类org.springframework.boot.loader.tools.FileUtils 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:BootRunTask.java   
private void addResourcesIfNecessary() {
    if (this.addResources) {
        SourceSet mainSourceSet = SourceSets.findMainSourceSet(getProject());
        final File outputDir = (mainSourceSet == null ? null
                : mainSourceSet.getOutput().getResourcesDir());
        final Set<File> resources = new LinkedHashSet<File>();
        if (mainSourceSet != null) {
            resources.addAll(mainSourceSet.getResources().getSrcDirs());
        }
        List<File> classPath = new ArrayList<File>(getClasspath().getFiles());
        classPath.addAll(0, resources);
        getLogger().info("Adding classpath: " + resources);
        setClasspath(new SimpleFileCollection(classPath));
        if (outputDir != null) {
            for (File directory : resources) {
                FileUtils.removeDuplicatesFromOutputDirectory(outputDir, directory);
            }
        }
    }
}
项目:spring-boot-concourse    文件:BootRunTask.java   
private void addResourcesIfNecessary() {
    if (this.addResources) {
        SourceSet mainSourceSet = SourceSets.findMainSourceSet(getProject());
        final File outputDir = (mainSourceSet == null ? null
                : mainSourceSet.getOutput().getResourcesDir());
        final Set<File> resources = new LinkedHashSet<File>();
        if (mainSourceSet != null) {
            resources.addAll(mainSourceSet.getResources().getSrcDirs());
        }
        List<File> classPath = new ArrayList<File>(getClasspath().getFiles());
        classPath.addAll(0, resources);
        getLogger().info("Adding classpath: " + resources);
        setClasspath(new SimpleFileCollection(classPath));
        if (outputDir != null) {
            for (File directory : resources) {
                FileUtils.removeDuplicatesFromOutputDirectory(outputDir, directory);
            }
        }
    }
}
项目:contestparser    文件:BootRunTask.java   
private void addResourcesIfNecessary() {
    if (this.addResources) {
        SourceSet mainSourceSet = SourceSets.findMainSourceSet(getProject());
        final File outputDir = (mainSourceSet == null ? null
                : mainSourceSet.getOutput().getResourcesDir());
        final Set<File> resources = new LinkedHashSet<File>();
        if (mainSourceSet != null) {
            resources.addAll(mainSourceSet.getResources().getSrcDirs());
        }
        List<File> classPath = new ArrayList<File>(getClasspath().getFiles());
        classPath.addAll(0, resources);
        getLogger().info("Adding classpath: " + resources);
        setClasspath(new SimpleFileCollection(classPath));
        if (outputDir != null) {
            for (File directory : resources) {
                FileUtils.removeDuplicatesFromOutputDirectory(outputDir, directory);
            }
        }
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:AbstractRunMojo.java   
private void addResources(List<URL> urls) throws IOException {
    if (this.addResources) {
        for (Resource resource : this.project.getResources()) {
            File directory = new File(resource.getDirectory());
            urls.add(directory.toURI().toURL());
            FileUtils.removeDuplicatesFromOutputDirectory(this.classesDirectory,
                    directory);
        }
    }
}
项目:spring-boot-concourse    文件:AbstractRunMojo.java   
private void addResources(List<URL> urls) throws IOException {
    if (this.addResources) {
        for (Resource resource : this.project.getResources()) {
            File directory = new File(resource.getDirectory());
            urls.add(directory.toURI().toURL());
            FileUtils.removeDuplicatesFromOutputDirectory(this.classesDirectory,
                    directory);
        }
    }
}
项目:contestparser    文件:AbstractRunMojo.java   
private void addResources(List<URL> urls) throws IOException {
    if (this.addResources) {
        for (Resource resource : this.project.getResources()) {
            File directory = new File(resource.getDirectory());
            urls.add(directory.toURI().toURL());
            FileUtils.removeDuplicatesFromOutputDirectory(this.classesDirectory,
                    directory);
        }
    }
}