>From the same source tree, I need to compile two monolithic SWFs, each with
a different CSS compiled in.
After upgrading to flex-mojos 3.3 I was planning to proceed as Colin
describes below, unless anyone disagrees.
Thanks.

On Tue, Jul 14, 2009 at 3:31 PM, Collin Peters <[email protected]>wrote:

>
> I'm coming in late to this discussion but I thought I would share what
> we do at our company.  We have a large legacy section of Flex code
> that contains multiple projects, and a few of the projects output
> multiple applications AND modules.  I wanted to compile this legacy
> code alongside our new projects that use a proper structure by
> default.  It is easily accomplished.  The legacy flex projects reside
> in <base>/flex/, so we created a new directory called <base>/flexV2/
> and in this folder we created a folder for EACH artifact output from
> the legacy projects.  So if there was a project that had two
> application and two modules that would equal four folders.  Each
> folder has a POM which references the necessary source code
>
>        <build>
>
>  <sourceDirectory>../../flex/LegacyProject/src</sourceDirectory>
>                <plugins>
>                        <plugin>
>                                <groupId>org.sonatype.flexmojos</groupId>
>
>  <artifactId>flexmojos-maven-plugin</artifactId>
>                                <version>${flex.mojos.version}</version>
>                                <extensions>true</extensions>
>                                <configuration>
>
>  <sourceFile>Application.mxml</sourceFile>
>
>  <output>${basedir}/../../tomcat-6.0.18/webapps/InTouchFDS/
> LegacyProject/Application.swf</output>
>                                </configuration>
>                        </plugin>
>
> This works great and we've had no problems that we haven't been able
> to solve.  Velo noted in a blog post (which I can't find right now)
> that you should NOT create a new project using a structure like this,
> but for legacy code it definitely works
>
> Collin
>
>
> On Jul 9, 9:43 pm, Darren <[email protected]> wrote:
> > May I ask what would happen if you had multiple executions of the
> > compile-swf-mojo, with a different sourceFile specification for each?
> >
> > I am not sure which if not all of these SWFs would be attached to the
> > build though?
> >
> > Best, Darren
> >
> > On Jun 24, 12:32 pm, Marvin Froeder <[email protected]> wrote:
> >
> > > Modules is supported.... and as I said before, I think is possible to
> use
> > > the modules support to build application....  if you need this, try
> modules.
> >
> > > VELO
> >
> > > On Wed, Jun 24, 2009 at 5:01 AM, Kalyan Sarkar <
> [email protected]>wrote:
> >
> > > > Hi Jerome,
> >
> > > > We are facing a similar problem. In our multi-module project we have
> > > > multiple flex applications (mxml) for each module which need to be
> > > > compiled into individual swfs, because the swfs are loaded
> > > > dynamically. At present we do not use flex-mojos. We simply run the
> > > > mxmlc command line compiler from maven-antrun-plugin for each
> > > > application and it takes a lot of time to build. Therefore I am
> > > > looking at a solution that can generate as many swfs for as many
> > > > applications in each module.
> >
> > > > I understand that our project structure violates the basic Maven
> > > > philosophy of 'one artifact per pom', but I would drive me mad if I
> > > > were to put each of 200+ applications in 200+ modules and have 200+
> > > > poms for each of them. It seems that none of the available Maven
> > > > plugins aor Ant tasks support this feature. I am looking at FCSH and
> > > > the compiler API and it looks like they have got memory leaks!
> >
> > > > Jerome, can you give some example poms and the change to made in the
> > > > flex-mojos.
> >
> > > > Regards,
> > > > Kalyan Sarkar
> >
> > > > On Jun 23, 7:15 am, James Cook <[email protected]> wrote:
> > > > > Jakob, I'm not second guessing your architecture in any way. I know
> > > > > that these things can come about for many different reasons. I just
> > > > > wanted to mention that we find ourselves in the same position at
> time
> > > > > and were accustomed to the any script that compiled dozens of swfs.
> > > > > (Especially font files and shared libraries.)
> >
> > > > > Now we package those shared libraries as a swc in its own pom. And
> a
> > > > > library that is shared amongst many swfs in the same project
> becomes
> > > > > just one module (swc) in a multi-module project.
> >
> > > > > just 2 cents...
> >
> > > > > On Mon, Jun 22, 2009 at 9:35 PM, jakob.kuelzer<
> [email protected]>
> > > > wrote:
> >
> > > > > > Hey *,
> >
> > > > > > thanks for all your great advise. Unfortunately they don't really
> > > > > > apply to my scenario. We have in fact 5 applications (that means
> > > > > > mx:Application containers) in one project. Non of those are
> really
> > > > > > big, its just smaller bits. In order to make packaging and
> deployments
> > > > > > easier it would have been nice to get functionality like this but
> if
> > > > > > it doesn't work it doesn't work. ;)
> >
> > > > > > Time for some ANT magic. ;)
> >
> > > > > > Cheers,
> > > > > > Jakob
> >
> > > > > > On Jun 22, 4:37 pm, jerome creignou <[email protected]>
> wrote:
> > > > > >> Hi,
> >
> > > > > >> I would like to share with you, how we deal with this problem.
> >
> > > > > >> We also have a Maven project that produces multiple artifacts.
> > > > Actually
> > > > > >> there is 1 application, N modules and others resources (CSS,
> images)
> > > > in each
> > > > > >> flex maven project.
> > > > > >> The trick is to declare a JAR packaging for the project instead
> of SWF
> > > > and
> > > > > >> then put anything you need (SWFs,CSS,...) inside the resulting
> jar. (I
> > > > had
> > > > > >> to patch flex-mojo to get this working since compiler mojo uses
> > > > > >> ${pom.packaging} for the output file extension.)
> >
> > > > > >> To build my webapp, I declare the dependency to my special jar,
> and
> > > > unpack
> > > > > >> it using the dependency plugin (dependency:unpack) to the
> > > > target/webapp
> > > > > >> directory.
> >
> > > > > >> I can post some poms, if you need more details.
> >
> > > > > >> Hope this helps.
> > > > > >> Jerome
> >
> > > > > >> 2009/6/22 Marvin Froeder <[email protected]>
> >
> > > > > >> > The only other idea I had is use modules support to build your
> > > > > >> > applications... but I don't know if that work, nor if work
> well.
> >
> > > > > >> > VELO
> >
> > > > > >> > On Mon, Jun 22, 2009 at 3:57 PM, jakob.kuelzer <
> > > > [email protected]>wrote:
> >
> > > > > >> >> Hey Marvin,
> > > > > >> >> thanks for your quick reply. I stumbled accross this one too,
> not
> > > > very
> > > > > >> >> satisfying though. I'll probably have to revert back to an
> Ant
> > > > > >> >> buildscript... :S
> >
> > > > > >> >> Cheers,
> > > > > >> >> Jakob
> >
> > > > > >> >> On Jun 22, 1:12 pm, Marvin Froeder <[email protected]>
> wrote:
> > > > > >> >> > They only way I know is this:
> >
> > > >
> http://maven.apache.org/guides/mini/guide-using-one-source-directory....
> >
> > > > > >> >> > <
> >
> > > >
> http://maven.apache.org/guides/mini/guide-using-one-source-directory....>
> > > > > >> >> > VELO
> >
> > > > > >> >> > On Mon, Jun 22, 2009 at 1:43 PM, jakob.kuelzer <
> > > > [email protected]
> > > > > >> >> >wrote:
> >
> > > > > >> >> > > Howdy *,
> > > > > >> >> > > I'm playing around with flexmojos and I really like the
> Idea of
> > > > using
> > > > > >> >> > > Maven for compiling flex apps into SWFs. However in the
> current
> > > > > >> >> > > project setup we have multiple applications in one
> project to
> > > > reuse
> > > > > >> >> > > stylesheets, assets, etc.
> >
> > > > > >> >> > > I know this is against the Maven philosophy "one single
> > > > artifact per
> > > > > >> >> > > project" but right now splitting it up would be too much
> effort
> > > > for no
> > > > > >> >> > > return. So I'm wondering if there's a way to use
> flexmojos to
> > > > compile
> > > > > >> >> > > all of those apps. I already thought about using profiles
> to
> > > > compile
> > > > > >> >> > > them separately but there must be an easier way... ?
> >
> > > > > >> >> > > Thanks in advance.
> >
> > > > > >> >> > > Cheers,
> > > > > >> >> > > Jakob- Hide quoted text -
> >
> > > > > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
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?hl=en?hl=en

http://blog.flex-mojos.info/
-~----------~----~----~----~------~----~------~--~---

Reply via email to