diff --git a/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy b/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy index 335559d14cf4..9e6e8df0eda7 100644 --- a/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy +++ b/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/WarModelBuilderImpl.groovy @@ -60,12 +60,6 @@ class WarModelBuilderImpl implements ModelBuilderService { def warModels = [] - Set excludeDirs = new HashSet() - def configuredExcludes = project.hasProperty("idea") ? project.idea?.module?.excludeDirs : null - if (configuredExcludes != null) { - excludeDirs.addAll((Collection)configuredExcludes) - } - project.tasks.each { Task task -> if (task instanceof War) { final WarModelImpl warModel = @@ -79,19 +73,19 @@ class WarModelBuilderImpl implements ModelBuilderService { @Override void visitSourcePath(String relativePath, String path) { def file = new File(path) - addPath(excludeDirs, webResources, relativePath, "", file.absolute ? file : new File(warTask.project.projectDir, path)) + addPath(webResources, relativePath, "", file.absolute ? file : new File(warTask.project.projectDir, path)) } @Override void visitDir(String relativePath, FileVisitDetails dirDetails) { - addPath(excludeDirs, webResources, relativePath, dirDetails.path, dirDetails.file) + addPath(webResources, relativePath, dirDetails.path, dirDetails.file) } @Override void visitFile(String relativePath, FileVisitDetails fileDetails) { if (warTask.webXml == null || !fileDetails.file.canonicalPath.equals(warTask.webXml.canonicalPath)) { - addPath(Collections.emptySet(), webResources, relativePath, fileDetails.path, fileDetails.file) + addPath(webResources, relativePath, fileDetails.path, fileDetails.file) } } }) @@ -134,14 +128,7 @@ class WarModelBuilderImpl implements ModelBuilderService { ).withDescription("Web Facets/Artifacts will not be configured properly") } - private static addPath(Set excludeList, - List webResources, - String warRelativePath, - String fileRelativePath, - File file) { - if (excludeList.contains(file)) { - return - } + private static addPath(List webResources, String warRelativePath, String fileRelativePath, File file) { warRelativePath = warRelativePath == null ? "" : warRelativePath WebConfiguration.WebResource webResource = new WebResourceImpl(warRelativePath, fileRelativePath, file) diff --git a/plugins/gradle/tooling-extension-impl/testData/testDefaultWarModel/build.gradle b/plugins/gradle/tooling-extension-impl/testData/testDefaultWarModel/build.gradle index 39fe393b227c..890f46fe6832 100644 --- a/plugins/gradle/tooling-extension-impl/testData/testDefaultWarModel/build.gradle +++ b/plugins/gradle/tooling-extension-impl/testData/testDefaultWarModel/build.gradle @@ -1,7 +1,6 @@ //noinspection GrPackage apply plugin: 'war' -apply plugin: 'idea' configurations { moreLibs @@ -29,7 +28,6 @@ configurations { // runtime files('extras') //} -idea.module.excludeDirs += files('build/generated_content') war { from('src/rootContent') { @@ -41,6 +39,4 @@ war { classpath configurations.moreLibs // adds a configuration to the WEB-INF/lib dir. webXml = file('src/someWeb.xml') // copies a file to WEB-INF/web.xml classpath file('src/bbb') - - from ('build/generated_content') // to be excluded from idea project by idea.module.excludeDirs } \ No newline at end of file