mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-103878 Option "Don't Detect" for Settings -> Maven -> Importing -> Generated sources folder has not the desired effect +review CR-IC @Anton.Makeev
This commit is contained in:
+4
-2
@@ -186,8 +186,10 @@ public class MavenFoldersImporter {
|
||||
|
||||
myModel.unregisterAll(targetDir.getPath(), true, false);
|
||||
|
||||
myModel.addSourceFolder(myMavenProject.getAnnotationProcessorDirectory(true), true, true);
|
||||
myModel.addSourceFolder(myMavenProject.getAnnotationProcessorDirectory(false), false, true);
|
||||
if (myImportingSettings.getGeneratedSourcesFolder() != MavenImportingSettings.GeneratedSourcesFolder.IGNORE) {
|
||||
myModel.addSourceFolder(myMavenProject.getAnnotationProcessorDirectory(true), true, true);
|
||||
myModel.addSourceFolder(myMavenProject.getAnnotationProcessorDirectory(false), false, true);
|
||||
}
|
||||
|
||||
File[] targetChildren = targetDir.listFiles();
|
||||
|
||||
|
||||
+19
@@ -608,6 +608,25 @@ public class FoldersImportingTest extends MavenImportingTestCase {
|
||||
"target/generated-sources");
|
||||
}
|
||||
|
||||
public void testIgnoreGeneratedSources() throws Exception {
|
||||
createStdProjectFolders();
|
||||
|
||||
MavenProjectsManager.getInstance(myProject).getImportingSettings().setGeneratedSourcesFolder(
|
||||
MavenImportingSettings.GeneratedSourcesFolder.IGNORE);
|
||||
|
||||
createProjectSubFile("target/generated-sources/annotations/A.java", "package com; class A {}");
|
||||
createProjectSubFile("target/generated-sources/annotations/com/B.java", "package com; class B {}");
|
||||
|
||||
importProject("<groupId>test</groupId>" +
|
||||
"<artifactId>project</artifactId>" +
|
||||
"<version>1</version>");
|
||||
|
||||
assertSources("project",
|
||||
"src/main/java",
|
||||
"src/main/resources");
|
||||
}
|
||||
|
||||
|
||||
public void testAddingExistingGeneratedSources4() throws Exception {
|
||||
createStdProjectFolders();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user