0
私のmavenプロジェクトでは、開発環境と統合環境に異なるlog4j設定を持っています。私のwebappの使用。 /メイン/リソースは/ dev/log4j.properties gwt-maven-pluginは "test"の代わりに "main" log4jの設定をロードします
- SRC:に位置
- のsrc /テスト/リソース/ INT/log4j_test.properties
だから私はthoses違いを管理するために、異なるプロファイル(DEV/INT)を持っている...
とSについて(ユニットテストのために使用される)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>
しかし、今、私はDEVモードではGWTの特定のユニットテストのためにGWT-のmaven-pluginのを追加しているが。
<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を上のポイントにそれを設定することは可能ですか?*
おかげで、
でシステムプロパティを渡すことができますありがとう。結構明白でシンプルなのは... :) –