首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gwt-maven-plugin中的其他类路径条目

gwt-maven-plugin中的其他类路径条目
EN

Stack Overflow用户
提问于 2013-04-10 17:18:39
回答 1查看 998关注 0票数 0

在执行gwt:test`时,我需要设置一些额外的类路径条目。它们主要包含属性文件,只有在运行时才需要。

我必须在pom中设置哪个配置参数才能获得额外的类路径条目?

我当前的gwt-maven-plugin配置如下(pom的片段):

代码语言:javascript
复制
  <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。我已经在这个小问题上花费了比我预期更多的时间。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-10 18:19:48

gwt:test将使用标准的Maven测试类路径,包括<scope>test</scope>testResources目录的-for资源依赖项。

假设您的属性文件是Maven模块的本地文件,那么只需将它们放在src/test/resources中,或者添加适当的父文件夹作为testResource

代码语言:javascript
复制
<build>
  <testResources>
    <testResource>
      <directory>${basedir}/src/test/resources</directory>
    </testResource>
    <testResource>
      <directory>${basedir}/src/test-properties-files</directory>
    </testResource>
  </testResources>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15921759

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档