On Wed, Feb 9, 2011 at 00:02, Maxime Lem <[email protected]> wrote:
> Thanks for the detailled answer :-) Sorry, I didn't want to show my knowledge (which is really limited btw) but to share what I've learned. > > > run "mvn clean install" on my common library project > > > run "mvn clean install" on my main project > > > > Both projects should refer to parsley as an RSL so you should change the > > dependency scope to rsl maintaining type swc > > Yes, this is what i've done > > > > > When I'm running the main swf, I'm getting : > > > "VerifyError: Error #1014: class > > > org.spicefactory.parsley.tag.core::MxmlObjectsTag could not be found." > > > > It looks like the optimization process has stripped out some metatags > from > > your library. I think you have two options: find out the needed tags and > use > > the keep-as3-metatags option > > Yes, I've set all the metadata I could fine :) to be kept. > I don't think it's a metadata stripping problem as it works for my > common RSL when Parsley scope is compile. In this case, Parsley > classes get linked to my common lib code, and then optimized with the > corresponding goal. > Ok, but in that case you need to retain parlsey metatags on your library, when producing parley lib you have to retain other metatags, I don't know which one they use. > Would this optimization be different when I run it from install-rsl on > Parsley lib directly ? > Actually the `install-rsl` goal will pick only the options provided as command line arguments and eventually those available in the pom of your current directory (I'm not sure about that) so I think it is almost the same result, but you can check comparing the two artifacts... BTW, this is the list of metatags I'm retaing when building RSLs: http://pastebin.com/dAWydcGs > > > or avoid the optimization process at all: the latter will produce a > bigger swf file (actually it will not produce a new > > swf file at all) but will be the easiest way. Remember, the InstallerMojo > > inherits everything from the OptimizerMojo so you have all and every > > feature/configuration of the `optimize` goal. > > What should be Parsley dependency scope then ? external ? > it should be rsl if you want to use it as rsl. I was suggesting to try to produce a non optimized RSL providing the additional *optimizeRsls<https://repository.sonatype.org/content/sites/maven-sites/flexmojos/3.8/optimize-mojo.html#optimizeRsls> *command line argument with a *false *value: this will extract the swf file from your swc file without changing anything in both of them ending in a bigger swf file for the rsl itself. This option will skip the optimization process so we can determine if the problem is in the optimization step or somewhere else. Please delete your maven local repository parsley libraries before trying this operation, the install-rsl goal doesn't support yet multiple installations of the same library. > > > Correct, the digest has been correctly updated but the optimized rsl is > > missing metatags. It is the standard behavior of the mxmlc to remove > unused > > classes from libraries, as you can imagine metatags are not used by the > > library itself... :-) It is not a flexmojo fault, it is an unexpected > > behavior of the flex compiler... > > Are you sure that optimisation on SWC remove classes ? > No, I think it doesn't and I think I've said something very wrong :) Thank you for giving me the opportunity to rethink about that. > For what I could read on adobe docs, optimisation remove debug info, > metadata, etc, not classes (?) > I think you are right, I'm nopt really sure regarding what happens during the optimization process. > Unused classes are not linked to SWF when these classes are on - > library-path compiler option (merged scope). They are all included on - > include-libraries option (internal scope). But why unused classes > would be removed for a SWC optimisation? It does not make sense to me > (you don't know what will be unused classes as you don't know to which > code you will be linked). > Though, these classes seems to be missing in the optimized SWC... > Let try to skip the optimization process with that argument, if it doesn't work we can try something different, I'm going to need the parsley library as an RSL too, even if we use a previous 2.2 version.... > > @+ > Maxime > > -- > You received this message because you are subscribed to the Google > Groups "Flex Mojos" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/flex-mojos > > http://flexmojos.sonatype.org/ > -- You received this message because you are subscribed to the Google Groups "Flex Mojos" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex-mojos http://flexmojos.sonatype.org/
