public File getBasedir()

in maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java [72:84]


    public File getBasedir(String project) throws IOException {
        if (name == null) {
            throw new IllegalStateException(
                    getClass().getSimpleName() + " must be a test class field annotated with org.junit.Rule");
        }
        File src = new File(projectsDir, project).getCanonicalFile();
        Assert.assertTrue("Test project directory does not exist: " + src.getPath(), src.isDirectory());
        File basedir = new File(workDir, name + "_" + project).getCanonicalFile();
        FileUtils.deleteDirectory(basedir);
        Assert.assertTrue("Test project working directory created", basedir.mkdirs());
        FileUtils.copyDirectoryStructure(src, basedir);
        return basedir;
    }