在执行gwt:test`时,我需要设置一些额外的类路径条目。它们主要包含属性文件,只有在运行时才需要。
我必须在pom中设置哪个配置参数才能获得额外的类路径条目?
我当前的gwt-maven-plugin配置如下(pom的片段):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwtVersion}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
<goal>i18n</goal>
<goal>generateAsync</goal>
</goals>
<configuration>
<extraJvmArgs>-Xmx1024M -Xss512M</extraJvmArgs>
</configuration>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
documentation at codehaus.org -->
<configuration>
<mode>htmlunit</mode>
<runTarget>Myproject.html</runTarget>
<out>${webappDirectory}</out>
<hostedWebapp>
${project.build.directory}/${project.build.finalName}
</hostedWebapp>
<i18nMessagesBundle>myproject.web.client.Messages</i18nMessagesBundle>
</configuration>
</plugin>我使用的是gwt 2.5.1。我已经在这个小问题上花费了比我预期更多的时间。
发布于 2013-04-10 18:19:48
gwt:test将使用标准的Maven测试类路径,包括<scope>test</scope>和testResources目录的-for资源依赖项。
假设您的属性文件是Maven模块的本地文件,那么只需将它们放在src/test/resources中,或者添加适当的父文件夹作为testResource
<build>
<testResources>
<testResource>
<directory>${basedir}/src/test/resources</directory>
</testResource>
<testResource>
<directory>${basedir}/src/test-properties-files</directory>
</testResource>
</testResources>https://stackoverflow.com/questions/15921759
复制相似问题