WOW!!!! I tried put 2 executors, but they aren't targeting the correct life-cycle phase (I tried do it on the wrapper phase and not in the compiler.. so dumb! :D)! That's great man, thank you very much for your support!
I know that, for "jar" package this scenario doesn't make sense... maybe the correct way would be create different artifacts, but different artifiacts could result a complex release because it would require different codebase... anyway, it's very nice we have this documented for anothers project where we need build different results according the compiler arguments passed to flex compiler. Thank you! o/ *Mario Souza*Front-End Developer Level 3, 54-56 Cambridge Terrace PO Box 19204, Wellington 6011 New Zealand *M.* +64 021 082 71135 | *W.* www.vizexplorer.com On 25 March 2015 at 21:52, Christofer Dutz <[email protected]> wrote: > Ok ... so it was possible exactly the way I hoped it would be :-) > > I just extended the flexmojos testsuite with an example: > > https://github.com/chrisdutz/flexmojos/tree/flexmojos-7.x/flexmojos-testing/flexmojos-test-harness/projects/concept/multiple-versions > > Hope this was what you wanted. Keep in mind ... the default compilation > doesn't have to be explicitly defined, just your second one. Here you have > to put stuff that is different from the first. So you configure things for > the default compilation in the default place and put the differences in the > executions configuration block. > > Chris > > ________________________________________ > Von: Christofer Dutz <[email protected]> > Gesendet: Mittwoch, 25. März 2015 09:18 > An: [email protected] > Betreff: AW: FlexMojos/Maven: one build to get different apps > > Hi Mario, > > Well this is generally a problem in Maven. Usually one Maven Module > produces one output artifact. > The problem with your profiles is that in these you probably set some > properties, plugin-settings etc. > Think of these as variables. If you activate two profiles the value of > these properties is set to one value > so the last assignment wins. That's why you only get one output even if > you activate both profiles. > > What you could try is to add a second execution of the compiler an in this > second execution you configure things differently. So if the default > compile run would produce "app-name-1.0.0.swf" the second execution could > set the "finalName" property to "app-name-ent-1.0.0.swf". It sould be > possible but I haven't tried this yet. Even if I am the maintainer of > Flexmojos I still have to dig into the code and the testsuite to confirm > this. > > I'll write a message as soon as I found out if this is possible and if it > is how you have to configure things. > > Chris > > > ________________________________________ > Von: Mario Souza <[email protected]> > Gesendet: Dienstag, 24. März 2015 22:31 > An: [email protected] > Betreff: FlexMojos/Maven: one build to get different apps > > Hi guys! > > So, I have an atypical scenario: > > - We have a same codebase to generate 2 different versions of the same > product: a "basic" version and a "professional" version. What determinate > how the final product will behave are some compiler arguments passed during > the build phase to FlexMojos. > > So, I've configured my maven project to build the product using the Maven > Profiles, and I'm able to run two commands: > - mvn clean install ..... -Pbasic > and this generates a "basic version" like this: app-name-1.0.0.swf > > In other hand, I can run: > - mvn clean install ..... -Pprofessional > and this generates a "professional version" like this: app-name-1.0.0.swf > > Note that, at end, I get different products of the same number version and > finalName (obviously, in dev-mode you are working only with one version and > if you run these two commands in sequence, the build result of the last one > will override the first). > > However, to dispatch a formal release, I'm thinking *how to get the two > different built products* *in one step/run command*. According the Maven > docs, I could activate many profiles in "one shot" like this: > - mvn clean install ... -Pbasic,professional > > But when I ran this command, and seeing the logs, just the last profile is > executed, and at end I get only one build created. > > I would like be able to compile the project in one command and, at end, get > final builds like this: > - app-name-1.0.0-basic.swf > - app-name-1.0.0-professional.swf > > I've tried a mix of profiles... tried include many <executions>, alter the > <finalName> passing an variable for "basic" or "professional" be > concatenated, tried use the <classifiers> but... not success. > > So, anyone have an idea about how I could do that? > In few words, Can I run two "build phase" passing different arguments for > each build in one maven execution/shot? > > > Thank you. > > @mariojunior >
