The install-rsl goal was made exactly for your problem: install or deploy a 3rd party library as an RSL.
I haven't tried it on Parsley yet, but I don't see any difference. > I've just given a try to install-rsl goal. > So here is what I've done and what I've got : > > delete org.spicefactory in my local maven repository > run "mvn flexmojos:install-rsl -DartifactId=parsley-flex3 - > DgroupId=org.spicefactory -Dversion=2.3.1" on my common-project pom. > It doesn't matter where you are running the above command as it will not look at your project unless you decide to deploy the artifact, in that case I suppose a valid POM with a valid deploy url is needed. What that goal will do is save your original swc file, get the swf file from the swc, run optimizations, update the swc digest signature and put the new swc and the swf into your local repo. > 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 > collect swf and rsl from my release module (using copy-flex-resources > goal with module artifact and version stripping enabled) > Nice to hear that this goal is useful for you too, it was not working on non war projects before. > 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 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. > So I have no error due to rsl digests anymore, but the RSL seems to be > missing some classes. > 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... > Maybe I should explain my project structure : > - A common lib which using Parsley with RSL scope > - A main project which using Parsley and common lib with RSL scope > Sounds very similar to our structure, but we have two more module projects using the common library and parsley. > If I delete scope of Parsley (=>compile) in both common lib and main > project, my app is working, and both common lib and main project are a > bit bigger. > Yes, because the optimized swf is not pushed into the swc file (it is not needed to remove unused classes from a swc file, only the needed ones will be statically linked into your own swf) so the classes are not missing. > I have a doubt on : > - which pom i have to run install-rsl goal against. I'm not sure if it > matters > As I said above, it doesn't matter until you want to use more advanced configurations like keep-as3-metatag which are very unhandy to specify at command line (and I'm not sure they can at all) - stripping module artifact and version from rsl. As the rsl filename > is then not default one for FM, I have to set rslUrl in my parent pom. > I don't if this could interfer with install-rsl - I think no, I guess > rsl path is given to module using the rsl, not the rsl itself. > I'm stripping the version from the rsl and I can't see any change. Actually the install-rsl goal doesn't care about stripping anything and I think you are referring to the copy-flex-resources goal which is not related to the install goal: the second can eventually pick resources installed with the first but nothing more than that.... I hope :) Roberto -- 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/
