开发者

Java heap space on deploying with flex-plugin

开发者 https://www.devze.com 2023-02-24 01:00 出处:网络
I have one flex project in maven. I am able to package and install it without any problems, but I am not able to deploy it:

I have one flex project in maven. I am able to package and install it without any problems, but I am not able to deploy it:

[ERROR] Java heap space -> [Help 1]
ja开发者_开发百科va.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)

I have already increased maximum allocated memory (set MAVEN_OPTS=-Xms2512m -Xmx3512m), no success.

This is my 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 package" runs ok. "mvn install" runs ok. "mvn deploy" fails with the exception above.

What is wrong?


That is WAY too much memory for maven and Java. You've literally ran out of memory in your computer. Set it to Xmx1024m and Xms512m. Should be more than enough for what you're trying to accomplish. Also, you should look into using FlexMojos if you want to compile Flex using Maven.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号