From ee386701bb930321b1660f7a331d20f9f425fdd1 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Mon, 5 Apr 2010 13:21:47 +0400 Subject: [PATCH] Maven: test --- .../maven/compiler/ResourceCopyingTest.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceCopyingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceCopyingTest.java index 3680c939732b..7b5618f7413c 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceCopyingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/compiler/ResourceCopyingTest.java @@ -15,6 +15,8 @@ */ package org.jetbrains.idea.maven.compiler; +import com.intellij.compiler.CompilerConfiguration; +import com.intellij.compiler.CompilerConfigurationImpl; import com.intellij.openapi.roots.CompilerModuleExtension; import com.intellij.openapi.roots.ModifiableRootModel; import com.intellij.openapi.roots.ModuleRootManager; @@ -223,6 +225,38 @@ public class ResourceCopyingTest extends MavenImportingTestCase { assertNotCopied("target/classes/file.properties"); } + public void testDoNotCopyExcludedStandardResources() throws Exception { + if (ignore()) return; + + CompilerConfigurationImpl configuration = (CompilerConfigurationImpl)CompilerConfiguration.getInstance(myProject); + configuration.addResourceFilePattern("*.zzz"); + + createProjectSubFile("res/file.xxx"); + createProjectSubFile("res/file.zzz"); + + importProject("test" + + "project" + + "1" + + + "" + + " " + + " " + + " res" + + " " + + " **/*.xxx" + + " " + + " " + + " **/*.zzz" + + " " + + " " + + " " + + ""); + + compileModules("project"); + assertCopied("target/classes/file.xxx"); + assertNotCopied("target/classes/file.zzz"); + } + public void testDeletingManuallyCopyedFiles() throws Exception { if (ignore()) return;