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
