В моем проекте maven у меня есть другая конфигурация log4j для среды разработки и интеграции, а также разные для тестовых целей, чем для основного использование моего webapp. Находится в:gwt-maven-plugin загружает «основную» конфигурацию log4j вместо «теста»
- SRC/основные/ресурсы/DEV/log4j.properties
- SRC/основные/ресурсы/INT/log4j.properties
- SRC/тест/ресурсы/Dev/log4j_test.properties
- SRC/тест/ресурсы/INT/log4j_test.properties
Поэтому у меня есть различные профили (DEV/INT) для управления thoses различия ...
И с urefire (используется для модульного тестирования) и отказоустойчивых (используется для тестирования интеграции) плагин Я добавил некоторые конфигурации:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<systemPropertyVariables>
<log4j.configuration>file:${basedir}/${profile.test.resource}/log4j_test.properties</log4j.configuration>
</systemPropertyVariables>
<!-- Stop the integration tests after the first failure to keep in database
the content of the failed test. -->
<skipAfterFailureCount>1</skipAfterFailureCount>
<includes>
<!-- Include only integration tests -->
<include>**/*IntegrationTest.java</include>
</includes>
<skip>${skip.integration.tests}</skip>
</configuration>
</plugin>
Но теперь я добавляю GWT-Maven-плагин для GWT конкретного модульного тестирования в режиме DEV.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.7.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>i18n</goal>
<goal>generateAsync</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<runTarget>Appication.html</runTarget>
<webappDirectory>${webappDirectory}</webappDirectory>
<hostedWebapp>${webappDirectory}</hostedWebapp>
<i18nMessagesBundles>
...
</i18nMessagesBundles>
<extraJvmArgs>${gwt.extra.args}</extraJvmArgs>
<style>${compile.style}</style>
<module>${module.name}</module>
</configuration>
</plugin>
Можно настроить его, чтобы указать на конкретную/фильтрованный lop4j как я сделал для безошибочного и отказоустойчивых *
Спасибо,
Благодарю. Вполне очевидно и просто ведь ... :) –