Yep. That's how I handle it. The extra steps, however, are how to include it in the war itself, since it's not a resource that's stored in src/main/webapp in the war project.
So I use the maven-dependency-plugin to include it by doing this (cut and pasted from the plugin docs at http://www.israfil.net/projects/ mojo/maven-flex2-plugin/usage.html): Because swf and swf dependencies are not natively understood by the maven-war-plugin, a war project will use the maven-dependency-plugin to extract desired .swf or .swc projects into a working folder, from which the war plugin can then insert them into the final packaged war. Add any flex dependencies to the project's pom.xml: <dependency> <groupId>a.group.id</groupId> <artifactId>an-artifact-id</artifactId> <version>X.Y.Z</version> <type>swf</type> </dependency> Then add a plugin execution of maven-dependency-plugin to pull in any swf/swc dependencies into a working folder, optionally stripping version numbers: <build> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-flex-resources</id> <!-- TODO: use prepare-package as of maven 2.0.5 --> <phase>process-classes</phase> <goals><goal>copy-dependencies</goal></goals> <configuration> <outputDirectory>$ {project.build.directory}/flex-resources</outputDirectory> <includeTypes>swf,swc</includeTypes> <stripVersion>true</stripVersion> </configuration> </execution> </executions> </plugin> ... Finally, configure the maven-war-plugin to use the flex-resources working directory as a supplementary source of web resources. ... <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <webResources> <resource> <!-- this is relative to the pom.xml directory --> <directory>${project.build.directory}/ flex-resources</directory> </resource> </webResources> </configuration> </plugin> ... </plugins> ... </build> This will deposit any .swf or .swc artifacts (optionally without version numbers) into the .war file. Anyway, look over the usage guide and see if there isn't any place we can take the best of both worlds. Better to have a single plugin that does things well than have separate approaches, unless there is a need. Mine uses the flex-sdk install, btw, and you have to set a "flex.home" property. Eventually, once the open-sourced compiler is available, I'll build the compiler in (or help adobe mavenize the jars and use it as a dependency of the plugin itself - whatever works). Christian. On May 10, 2007, at 11:30 AM, jeff_at_flexgroups wrote: > Next release (0.9.2) will include unit testing (using XMLSocket > communication) and ASDoc generation. > > Concerning SWF inclusion, we thought the users should build their apps > using multi-module build. > > ... > <modules> > <module>swc-module1</module> > <module>swc-module2</module> > <module>swf-app</module> > <module>war</module> > </modules> > ... > > So our approach to include the SWF is to include it as an artifact, a > typed-dependency to let Maven manage its resolution : > > <dependency> > <groupId>myMultiModuleGroup</groupId> > <artifactId>swf-app</artifactId> > <type>SWF</type> > </dependency> > > It sounded the best solution to me, but it is true the developper will > have to manage several projects to build a simple war artifact... > > I totally agree with you concerning collaboration ! > > --- In [email protected], Christian Gruber <[EMAIL PROTECTED]> > wrote: >> >> Hmmm. I'm confused. how come I couldn't find you guys when I went >> to write this sucker. :) >> >> We should probably collaborate, since I'm working on asdoc and unit >> test inclusion as well. >> >> I have an approach for inclusion of swfs in the .war that pulls in >> swfs into a resources folder that is then included as a webresource >> by the .war. None of it is rocket science. >> >> Christian. >> >> >> On May 10, 2007, at 4:06 AM, jeff_at_flexgroups wrote: >> >>> Actually, the SB M2F2 Plugin build SWCs, SWFs, and manages SWC >>> dependencies. We used it for multi-module builds and bundle assembly >>> (we manage several SWC/SWF projects with Maven 2, M2F2 Plugin and >>> CruiseControl). I can provide you POM samples if needed. >>> >>> We are currently working on ASDoc generation, unit tests >>> integration. >>> We thought about HTML wrapper generation but finally we won't >>> implement it : other plugins should assume this responsibility >>> responsibility (WAR ?). >>> >>> If anyone want to be included as a member of the SF.net project, >>> just >>> send me an email. >>> >>> I hope this helps. Jeff. >>> >>> --- In [email protected], "Brian Sterling" >>> <brian_sterling@> wrote: >>>> >>>> I found some old posts about the Israfil plugin >>>> http://www.israfil.net/projects/mojo/maven-flex2-plugin/ >>>> and found the ServeBox Maven2Flex2 plugin >>>> http://sourceforge.net/projects/mvnflex2plugin >>>> from the wikipedia article on Flex. >>>> >>>> Neither one seems to have an especially active developer community. >>>> >>>> Any suggestions on how I should be building a multiple-module >>>> project >>>> with third-party dependencies (e.g. Cairngorm) with Maven 2? >>>> >>>> It sounds like several of us are interested in this - maybe it's >>>> time >>>> to collaborate on building up one of these plugins (or start a new >>>> one?). >>>> >>>> -Brian >>>> >>> >>> >> >> christian gruber + [EMAIL PROTECTED] + bus 905.640.1119 + mob >> 416.998.6023 >> process coach and architect + ISRÁFÍL CONSULTING SERVICES >> > > christian gruber + [EMAIL PROTECTED] + bus 905.640.1119 + mob 416.998.6023 process coach and architect + ISRÁFÍL CONSULTING SERVICES

