IDEA-133754 Maven: resources builder: support outputDirectory parameters of maven...
[idea/community.git] / plugins / maven / jps-plugin / src / org / jetbrains / jps / maven / compiler / MavenResourcesBuilder.java
index 1df416dc0fe1f11bae440cbf1cb7b0c95ffc40ce..69184dd04fd6cf73685eed7cb5d0fea8002415df 100644 (file)
@@ -98,7 +98,8 @@ public class MavenResourcesBuilder extends TargetBuilder<MavenResourceRootDescri
         if (relPath == null) {
           continue;
         }
-        final File outputDir = MavenResourcesTarget.getOutputDir(target.getModuleOutputDir(), rd.getConfiguration(), config.outputDirectory);
+        final String outputDirectory = target.isTests() ? config.testOutputDirectory : config.outputDirectory;
+        final File outputDir = MavenResourcesTarget.getOutputDir(target.getModuleOutputDir(), rd.getConfiguration(), outputDirectory);
         if (outputDir == null) {
           continue;
         }