Плагин весенней загрузки maven: включите тестовые ресурсы - PullRequest
0 голосов
/ 26 апреля 2019

У меня следующая структура каталогов:

src
|
|___ main
|
|___ test
      |
      |___resources

Я хочу включить все файлы из тестовых ресурсов в classpath при запуске цели запуска (spring-boot: start, отличной от spring-boot: run) в фазе pre-Integration-test.

Мой pom.xml:

            <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
                <execution>
                    <id>pre-integration-test</id>
                    <goals>
                        <goal>start</goal>
                    </goals>
                    <configuration>
                        <wait>1000</wait>
                        <maxAttempts>30</maxAttempts>
                    </configuration>
                </execution>
                <execution>
                    <id>post-integration-test</id>
                    <goals>
                        <goal>stop</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

Я безуспешно пытался включить флаги addResources или useTestClasspath, я действительно не могу понять, как они должны работать, даже читая документацию (https://docs.spring.io/spring-boot/docs/current/maven-plugin/start-mojo.html).

Заранее спасибо.

...