Well, As for the debug=true/false, it is definitely false and the size is still big, twice the size it should be. My guess is that it include more files that it actually needs, but I have no way to look inside the swf. (Do you know of any method to do it?)
As for moving code to the swc, it is already the case and it does not solve the problem. The weird thing is that the Flex Builder does not have any of this problems, so it means it something to do with Maven and the plugin and not with the flex compiler directly. If you have more ideas, I will be happy to hear them. Mean while it looks like I have no choice but to debug the plugin and send you my patch if I'm successful. By the way, I tried to make the heap memory of Maven bigger, but it didn't help as well. On 10/15/07, Christian Edward Gruber <[EMAIL PROTECTED]> wrote: > > Ah. By default, the plugin (and the command-line tool) creates a > debug version of the .swf. If you want the non-debug (deployable, > small, faster) version of the .swf, then you should add <debug>false</ > debug> in your maven-flex2-plugin configuration section. > > As to out of memory, I'm not sure why that would be, except that you > may have a very large project and need to allocate more during the > flex compiler invocation. The plugin doesn't currently support java > vm arguments, but I can add that as a feature. > > One way to (possibly) address this as a workaround is to move some of > your code into a .swc project and then depend on that, so each compile > operation is smaller. Having said that, you're currently out of > memory in what appears to be a linking phase, so it's possible this > wouldn't help. I suspect that <debug>false</debug> will help, as > producing the optimized version of a binary, in most compilers, takes > less memory than the debug version. > > regards, > Christian. > > > On 14-Oct-07, at 1:14 PM, Ronen Naor wrote: > > > Hi, > > Has anyone encountered the following problem using the maven israfil > > plugin: > > > > java.lang.OutOfMemoryError: Java heap space > > at java.util.HashMap.resize(Unknown Source) > > at java.util.HashMap.addEntry(Unknown Source) > > at java.util.HashMap.put(Unknown Source) > > at macromedia.abc.ByteArrayPool.store(BytecodeBuffer.java:381) > > at macromedia.abc.IndexHistory.decodeOnDemand(ConstantPool.java:823) > > at macromedia.abc.IndexHistory.getIndex(ConstantPool.java:553) > > at macromedia.abc.IndexHistory.decodeOnDemand(ConstantPool.java:785) > > at macromedia.abc.IndexHistory.getIndex(ConstantPool.java:553) > > at macromedia.abc.Encoder.OP_callproperty(Encoder.java:2029) > > at macromedia.abc.Decoder$Opcodes.decode(Decoder.java:1389) > > at macromedia.abc.Decoder$MethodBodies.decode(Decoder.java:523) > > at flex2.tools.PostLink.merge(PostLink.java:325) > > at flex2.tools.PostLink.run(PostLink.java:72) > > at flex2.linker.API.link(API.java:42) > > at flex2.tools.Compiler.main(Compiler.java:226) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at net.israfil.mojo.flex2.StreamedParameterExecutableWrapper.main( > > StreamedParameterExecutableWrapper.java:62) > > > > Also the created swf is twice the size of the swf created by Flex > > Builder. > > > > Thanks, > > Ronen. > > >

