Maven gwt:将分叉到另一个Xmx

问题描述 投票:3回答:1

编辑:我通过将插件从“配置文件”部分移至常规构建插件部分来解决了这个问题,即使我不理解我的理解如何运行,在配置文件之外,插件甚至都没有定义,因此即使在正确的配置文件之外也无法访问它。

我有一个使用Maven的Vaadin 6.8应用程序,该应用程序再也找不到它的窗口小部件集,因此我想重新编译该窗口小部件集,但是由于以下错误而失败:

[[错误]信息:搜索涂料。[INFO] [ERROR]'jar:file:/home/username/.m2/repository/com/vaadin/vaadin/6.8.0/vaadin-6.8.0.jar!/ com / vaadin / terminal / gwt / client / WidgetSet.java'[INFO] [ERROR]内部编译器错误[INFO] java.lang.OutOfMemoryError:超出了GC开销限制[INFO]位于org.apache.xerces.dom.DeferredDocumentImpl.getNodeObject(未知来源)

设置`export MAVEN_OPTS =“-Xmx12000m”之后(可以肯定的是,它派生到另一个Xmx(512)并仍然收到错误(htop片段):

│  │     ├─ /opt/java/bin/java -Xmx12000m -classpath ...
│  │     ├─ /opt/java/jre/bin/java -Xmx512m -classpath ...

我的系统:Linux pcname 3.15.2-1-ARCH #1 SMP PREEMPT Fri Jun 27 07:41:19 CEST 2014 x86_64 GNU/Linux,8 GB RAM

P.S .:我也将localworkers设置为1并将fork设置为false,但这两个都不起作用。

编辑---托马斯回答:我已经使用了extraJvMArgs。我在这里做错了什么吗?

    <profile>
        <id>compile-widgetset</id>
        <build>
            <plugins>
                <!-- Compile custom GWT components or widget dependencies with the GWT 
                    compiler -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>${gwt.plugin.version}</version>
                    <configuration>
                        <localWorkers>1</localWorkers>
                        <fork>false</fork>
                        <webappDirectory>src/main/webapp/VAADIN/widgetsets</webappDirectory>
                        <extraJvmArgs>-Xmx2000M -Xss1024k -XX:+UseConcMarkSweepGC</extraJvmArgs>
                        <runTarget>autosparql-tbsl</runTarget>
                        <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
                        <noServer>true</noServer>
                        <port>9090</port>
                        <compileReport>false</compileReport>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>resources</goal>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-dev</artifactId>
                            <version>${gwt.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-user</artifactId>
                            <version>${gwt.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>com.vaadin</groupId>
                    <artifactId>vaadin-maven-plugin</artifactId>
                    <version>1.0.2</version>
                    <executions>
                        <execution>
                            <configuration>
                            </configuration>
                            <goals>
                                <goal>update-widgetset</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>

P.S .:我现在使用了“ mvn -X gwt:compile”,它只显示默认的512M:

[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
[...]
  <extraJvmArgs default-value="-Xmx512m">${gwt.extraJvmArgs}</extraJvmArgs>
maven gwt out-of-memory vaadin
1个回答
3
投票

分叉的JVM的-Xmx在gwt-maven-plugin配置中设置:https://gwt-maven-plugin.github.io/gwt-maven-plugin/compile-mojo.html#extraJvmArgs

extraJvmArgs:

© www.soinside.com 2019 - 2024. All rights reserved.