1

I have a bunch of tests from an application written in Eclipse a year or two ago.

The app does some complex comparisons between directory structures and files within the structures.

I have migrated to using IntelliJ since writing this app and now find that the tests that rely on empty directories being copied from the fixtures directory structure no longer work.

Is there some way to force IntelliJ to copy all directories (not just the ones with contained files) from a folder marked as "Test Resources Root" into target/test-classes?

The application build manager is Maven 3, is it possible to modify the Maven POM and get the structure included in the build automatically?

Chris Cooper
  • 4,982
  • 1
  • 17
  • 27

1 Answers1

0

It seems adding this fixed the problem:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <includeEmptyDirs>true</includeEmptyDirs>
            </configuration>
        </plugin>
    </plugins>
    <testResources>
        <testResource>
            <directory>fixtures</directory>
        </testResource>
        <testResource>
            <directory>fixtures</directory>
        </testResource>
    </testResources>
</build>

I found more detail here: Maven - how to include empty directories

Community
  • 1
  • 1
Chris Cooper
  • 4,982
  • 1
  • 17
  • 27