Sorry, I tend to write less explanation when I'd already been
discussing it in another thread :)

Maven1 has settings so you can fork the compiler in a new JVM, using
its own memory settings. Maven2 doesn't yet have that.

You can change Maven2's settigs (and hence the compilers), using
MAVEN_OPTS. This is an environment variable passed directly to the JVM
as arguments, eg:

MAVEN_OPTS=-Xmx1024m

Will set the maximum heap to 1024m.

Cheers,
Brett

On 8/5/05, Rizwan Merchant <[EMAIL PROTECTED]> wrote:
> 
> thanks for the response Brett.
> I actually do have a lot of source to compile...around 3500 files. Is it
> possible that the compilation is generating so many errors that the compiler
> is running out of memory (make sense?)
> 
> sorry for the the trivial questions, but I'm using maven for the first time.
> when you say "those settings arent supported", which settings are you
> referring to? can you show me an example of how to use the MAVEN_OPTS
> setting?
> 
> thanks again,
> -Riz.
> 
> -----Original Message-----
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 04, 2005 8:33 PM
> To: Maven Users List
> Subject: Re: Maven2 help
> 
> 
> Those settings aren't currently supported and since the compiler isn't
> forked, you're getting the settings m2 uses (which are the JVM
> defaults). You can control this with MAVEN_OPTS.
> 
> Do you really have that much source to compile, or is this happening
> on any project?
> 
> - Brett
> 
> On 8/5/05, Rizwan Merchant <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> > I'm trying to use maven2 to compile some code using the pom.xml file shown
> > below,.i.e., I am running the command "m2 -compile" on a certain project.
> > Maven2 starts up but eventually dies with a "Compilation failure" message
> of
> > the following nature:
> >
> > [INFO] Reason: Compilation failure
> >
> [INFO] ---------------------------------------------------------------------
> > ----
> > ---
> > [INFO] Failure executing javac, but could not parse the error:
> >
> > The system is out of resources.
> > Consult the following stack trace for details.
> > java.lang.OutOfMemoryError
> >
> > Any one have any ideas as to why this may be happening?
> >
> > Thanks for your help.
> > -Riz.
> >
> > --------------------------------------------------------------------------
> --
> > ----------------------------
> >
> > <project>
> >   <modelVersion>4.0.0</modelVersion>
> >   <groupId>com.mycompany.app</groupId>
> >   <artifactId>my-app</artifactId>
> >   <packaging>jar</packaging>
> >   <version>1.0-SNAPSHOT</version>
> >   <name>Maven Quick Start Archetype</name>
> >   <url>http://maven.apache.org</url>
> >   <build>
> >   <plugins>
> >       <plugin>
> >         <groupId>org.apache.maven.plugins</groupId>
> >         <artifactId>maven-compiler-plugin</artifactId>
> >         <configuration>
> >           <source>1.4</source>
> >           <target>1.4</target>
> >           <minmemory>128m</minmemory>
> >          <maxmemory>1024m</maxmemory>
> >         </configuration>
> >       </plugin>
> >
> >   </plugins>
> >
> >         <sourceDirectory>source</sourceDirectory>
> >   </build>
> >   <dependencies>
> >     <dependency>
> >       <groupId>junit</groupId>
> >       <artifactId>junit</artifactId>
> >       <version>3.8.1</version>
> >       <scope>test</scope>
> >     </dependency>
> >   </dependencies>
> > </project>
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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]
> 
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to