maven: do not exclude project root (IDEA-57657)

This commit is contained in:
Anton Makeev
2010-09-28 20:10:32 +04:00
parent 5a8ed8b556
commit 831bd9b541
3 changed files with 22 additions and 2 deletions
@@ -142,6 +142,7 @@ public class MavenRootModelAdapter {
Url url = toUrl(path);
ContentEntry e = getContentRootFor(url);
if (e == null) return;
if (e.getUrl().equals(url.getUrl())) return;
e.addExcludeFolder(url.getUrl());
}
@@ -37,9 +37,9 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class JavaClasspathConfigurationTest extends MavenImportingTestCase {
public class MavenClasspathConfigurationTest extends MavenImportingTestCase {
public static Test suite() {
return new TestSuite(JavaClasspathConfigurationTest.class, "testConfiguringModuleDependencies");
return new TestSuite(MavenClasspathConfigurationTest.class, "testConfiguringModuleDependencies");
}
@@ -645,6 +645,25 @@ public class FoldersImportingTest extends MavenImportingTestCase {
getProjectPath() + "/target/testCustom");
}
public void testDoNotExcludeExcludeOutputDirectoryWhenItPointstoRoot() throws Exception {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +
"<version>1</version>" +
"<build>" +
" <outputDirectory>.</outputDirectory>" +
" <testOutputDirectory>.</testOutputDirectory>" +
"</build>");
assertModules("project");
assertExcludes("project",
"target");
assertModuleOutput("project",
getProjectPath(),
getProjectPath());
}
public void testOutputDirsOutsideOfContentRoot() throws Exception {
importProject("<groupId>test</groupId>" +
"<artifactId>project</artifactId>" +