【问题标题】:Java heap space on deploying with flex-plugin使用 flex-plugin 部署 Java 堆空间
【发布时间】:2011-04-11 16:13:28
【问题描述】:

我在 Maven 中有一个 flex 项目。 我可以毫无问题地打包和安装它,但我无法部署它:

[ERROR] Java heap space -> [Help 1]
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2734)
        at java.util.ArrayList.ensureCapacity(ArrayList.java:167)
        at java.util.ArrayList.addAll(ArrayList.java:474)
        at org.apache.maven.project.MavenProject.setActiveProfiles(MavenProject.java:1410)
        at org.apache.maven.project.MavenProject.deepCopy(MavenProject.java:1961)

我已经增加了最大分配内存(设置 MAVEN_OPTS=-Xms2512m -Xmx3512m),没有成功。

这是我的 pom:

<parent>
    <groupId>com.test</groupId>
    <artifactId>super-pom</artifactId>
    <version>1.2</version>
</parent>

<artifactId>services</artifactId>

<name>Services</name>
<packaging>swc</packaging>

<properties>
    <flex.version>4.1.0.16076</flex.version>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>org.servebox.flex</groupId>
            <artifactId>flex-plugin</artifactId>
            <version>3.0.0-beta5</version>
            <extensions>true</extensions>

            <configuration>
                <locale>en_US</locale>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                    <version>2.8.1</version>
                </dependency>
            </dependencies>
        </plugin>

    </plugins>
</build>

<dependency> 
    <groupId>com.adobe.flash.core</groupId> 
    <artifactId>playerglobal</artifactId> 
    <version>2.0</version> 
    <scope>provided</scope> 
    <type>swc</type> 
</dependency> 
<dependency> 
    <groupId>com.adobe.flex.sdkcore</groupId> 
    <artifactId>framework</artifactId> 
    <version>${flex.version}</version> 
    <type>swc</type> 
</dependency> 
<dependency> 
    <groupId>com.adobe.flex.sdkcore</groupId> 
    <artifactId>flex</artifactId> 
    <version>${flex.version}</version> 
    <type>swc</type> 
</dependency>  
<dependency> 
    <groupId>com.adobe.flex.sdkcore</groupId> 
    <artifactId>rpc</artifactId> 
    <version>${flex.version}</version> 
    <type>swc</type> 
</dependency> 
<dependency> 
    <groupId>com.adobe.flex.sdkcore</groupId> 
    <artifactId>spark</artifactId> 
    <version>${flex.version}</version> 
    <type>swc</type> 
</dependency> 
<dependency> 
    <groupId>com.adobe.flex.sdkcore</groupId> 
    <artifactId>utilities</artifactId> 
    <version>${flex.version}</version> 
    <type>swc</type> 
</dependency>
<!-- LOCALE -->
<dependency>
    <groupId>com.adobe.flex.locales.en_US</groupId> 
    <artifactId>framework_rb</artifactId> 
    <version>${flex.version}</version> 
    <type>swc</type> 
</dependency> 
<dependency>
    <groupId>com.adobe.flex.locales.en_US</groupId> 
    <artifactId>rpc_rb</artifactId> 
    <version>${flex.version}</version> 
    <type>swc</type> 
</dependency>
<dependency>
    <groupId>com.adobe.flex.locales.en_US</groupId> 
    <artifactId>spark_rb</artifactId> 
    <version>${flex.version}</version> 
    <type>swc</type> 
</dependency>

“mvn 包”运行正常。 “mvn install”运行正常。 “mvn deploy”失败,但上述异常。

怎么了?

【问题讨论】:

    标签: java apache-flex maven-3


    【解决方案1】:

    这对于 maven 和 Java 来说内存太大了。您实际上已经耗尽了计算机中的内存。将其设置为 Xmx1024m 和 Xms512m。对于您要完成的工作,应该绰绰有余。另外,如果你想使用 Maven 编译 Flex,你应该考虑使用 FlexMojos

    【讨论】:

      猜你喜欢
      • 2019-10-14
      • 1970-01-01
      • 2012-06-21
      • 1970-01-01
      • 2013-09-15
      • 1970-01-01
      • 2021-09-09
      • 2011-01-04
      • 2018-03-28
      相关资源
      最近更新 更多