gwt-maven-plugin: How to set system properties for the gwt:run goal in the pom.xml?

一世执手 提交于 2019-12-01 06:15:48

See Compile Guide for gwt-maven-plugin. You can use the extraJvmArgs element.

  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>2.2.0</version>
    <executions>
      <execution>
        <configuration>
          <extraJvmArgs>-Xmx512M -Xss1024k -Dfoo=bar</extraJvmArgs>
        </configuration>
        <goals>
          <goal>compile</goal>
        </goals>
      </execution>
    </executions>
  </plugin>

Edit: This turned out not to work for the gwt:run goal, but moving the extraJvmArgs into the plugin (rather than execution) configuration did: -

  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>2.2.0</version>
    <configuration>
      <extraJvmArgs>-Xmx512M -Xss1024k -Dfoo=bar</extraJvmArgs>
    </configuration>
  </plugin>

systemProperties are not properties but a map

Use it like this :

<systemProperties>
      <configDir>${basedir}/local/staging</configDir> 
</systemProperties>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!