Thanks guys for your suggestions. I have used the following compiler plugin
configuration:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <encoding>UTF-8</encoding>
          <fork>true</fork>
          <meminitial>512m</meminitial>
          <maxmem>1024m</maxmem>
        </configuration>
      </plugin>

It helped, but not straightway.

I am using multiple project structure and have one aggregate project that
manages other sub projects and provides configuration used by all sub
projects. The compiler plugin above was specified in the aggregate project
and the project that was failing was one of the sub projects. However, when
I placed the compiler plugin configuration specified above into the sub
project's POM the compilation went fine.

I am not Maven guru and I have probably missed something, but I was assuming
that sub project will use configurations from the parent one.

Thanks for your help!




Bruno Aranda wrote:
> 
> It's MAVEN_OPTS
> 
> Cheers,
> 
> Bruno
> 
> 2009/8/13 kopemor <[email protected]>:
>>
>> Hello,
>>
>> I am getting "java.lang.OutOfMemoryError: Java heap space" exception when
>> I
>> compile my project using Maven. I have tried several options:
>>
>> 1. Setting variable: export MAVEN_OPT=-Xmx1024m
>>
>> 2. Using Maven compile plugin:
>>     <plugin>
>>       <groupId>org.apache.maven.plugins</groupId>
>>        <artifactId>maven-compiler-plugin</artifactId>
>>        <configuration>
>>          <source>1.5</source>
>>          <target>1.5</target>
>>          <encoding>UTF-8</encoding>
>>          <argLine>-Xms512m</argLine>
>>          <argLine>-Xmx1024m</argLine>
>>          <disableXmlReport>true</disableXmlReport>
>>        </configuration>
>>      </plugin>
>>
>> I have even tried to put max heap size to 4094, the result is the same.
>>
>> Any help?
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Maven-java.lang.OutOfMemoryError-tp24952498p24952498.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maven-java.lang.OutOfMemoryError-tp24952498p24954068.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to