Thank you for your help, I got everything working. I've updated the stackoverflow question incase you want to comment:
http://stackoverflow.com/questions/18505129/how-do-i-get-flexunit-flexmojos-and-mockolate-to-work-together brought to you by the letters A, V, and I and the number 47 On Wed, Sep 4, 2013 at 5:29 PM, Frédéric THOMAS [via Apache Flex Users] <[email protected]> wrote: > I just read it better and it not how I do but it is smart. > > I usually have parent pom by type of child (swf, swc for Flex) that > preconfigure other libs, so, the test part resides in an artifact where I > don't have include either FM nor other common Flex lib. > > At the end the result is almost the same than what you did using > self-extracting profiles. > > -Fred > > -----Message d'origine----- > De : Frédéric THOMAS [mailto:[hidden email]] > Envoyé : mercredi 4 septembre 2013 16:10 > À : [hidden email] > Objet : RE: AW: AW: how to setup and use maven-flex-plugin > > Yes, I didn't do in deep because I wan't to keep it simple but basically, it > is what I do as well :-) > > -Fred > > -----Message d'origine----- > De : [hidden email] [mailto:[hidden email]] > Envoyé : mercredi 4 septembre 2013 16:05 À : [hidden email] Objet : > AW: AW: AW: how to setup and use maven-flex-plugin > > Good Idea ... I usually do that using a self-activating Profile in the > Project root-pom: > > <profile> > <id>flex-project</id> > <activation> > <file> > <exists>src/main/flex</exists> > </file> > </activation> > <dependencies> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>playerglobal</artifactId> > <version>${flex.version}</version> > <classifier>${flashplayer.version}</classifier> > <type>swc</type> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>textLayout</artifactId> > <version>${flex.version}</version> > <type>swc</type> > <scope>caching</scope> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>framework</artifactId> > <version>${flex.version}</version> > <type>swc</type> > <scope>caching</scope> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>spark</artifactId> > <version>${flex.version}</version> > <type>swc</type> > <scope>caching</scope> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>sparkskins</artifactId> > <version>${flex.version}</version> > <type>swc</type> > <scope>caching</scope> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>mx</artifactId> > <version>${flex.version}</version> > <type>swc</type> > <scope>caching</scope> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>rpc</artifactId> > <version>${flex.version}</version> > <type>swc</type> > <scope>caching</scope> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>charts</artifactId> > <version>${flex.version}</version> > <type>swc</type> > <scope>caching</scope> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>advancedgrids</artifactId> > <version>${flex.version}</version> > <type>swc</type> > <scope>caching</scope> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>flex-framework</artifactId> > <version>${flex.version}</version> > <type>pom</type> > </dependency> > <dependency> > <groupId>org.flexunit</groupId> > <artifactId>flexunit</artifactId> > <version>4.1.0</version> > <type>swc</type> > <classifier>flex4</classifier> > <scope>test</scope> > </dependency> > </dependencies> > </profile> > > This way I don't even have to configure the flexmojos plugin at all (ok ... > I do have to add it, but it pulls all configuration stuff from the root pom) > ... all I do is create a src/main/flex Directory and give the module a > packaging of "swc" or "swf" ... here a sample SWF modules pom.xml: > > <?xml version="1.0" encoding="UTF-8"?> > <project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > <parent> > <groupId>de.cware.cweb</groupId> > <artifactId>cweb-core.client</artifactId> > <version>1.0.0-SNAPSHOT</version> > </parent> > <groupId>de.cware.cweb</groupId> > <artifactId>cweb-core.client.lib-utils</artifactId> > <version>1.0.0-SNAPSHOT</version> > <packaging>swc</packaging> > <name>C-Web Core (Client): Library Utils</name> > <build> > <sourceDirectory>src/main/flex</sourceDirectory> > <testSourceDirectory>src/test/flex</testSourceDirectory> > <plugins> > <plugin> > <groupId>${flexmojos.groupId}</groupId> > <artifactId>flexmojos-maven-plugin</artifactId> > <extensions>true</extensions> > </plugin> > </plugins> > </build> > <dependencies> > <dependency> > <groupId>de.cware.cweb</groupId> > <artifactId>cweb-evaluator.lib-utils</artifactId> > <version>1.0.0-SNAPSHOT</version> > <type>swc</type> > </dependency> > <dependency> > <groupId>org.springframework</groupId> > <artifactId>spring-actionscript</artifactId> > <version>0.7.1</version> > <type>swc</type> > </dependency> > <dependency> > <groupId>com.google.maps</groupId> > <artifactId>map-flex</artifactId> > <version>1.18</version> > <type>swc</type> > </dependency> > > <dependency> > <groupId>de.cware.cweb</groupId> > <artifactId>cweb-core.client.lib-model</artifactId> > <version>1.0.0-SNAPSHOT</version> > <type>swc</type> > </dependency> > </dependencies> > </Project> > > This way there is no Need to do any of the Default Framework imports, > Compiler fine-tuning etc at all in your artifact. > > Just to add my 50ct to the dsicussion ;-) > > Chris > > PS: Yes this was a pom taken from an old Project still runnnig with > FM4.2-beta and Flex 4.5.1 but I guess you should get the Point ;-) > > > > > > ________________________________________ > Von: Frédéric THOMAS [[hidden email]] > Gesendet: Mittwoch, 4. September 2013 15:41 > An: [hidden email] > Betreff: RE: AW: AW: how to setup and use maven-flex-plugin > > When I say module I mean maven module indeed, so, yes: > > 1- Add the test dependencies you need (FU, Mockolate, etc...) in a new > module + optionally some useful test code in sources, package it as swc, > build it with FM. > 2- Add this freshly test lib dependency as test (scope test) dependency of > the modules you need to test. > > That a nice way separate your test concerns. > > -Fred > > -----Message d'origine----- > De : akessner [mailto:[hidden email]] Envoyé : mercredi 4 septembre 2013 > 15:34 À : [hidden email] Objet : RE: AW: AW: how to setup and use > maven-flex-plugin > > Great idea! I save that as a pom or as a swc artifact ? > On 4 Sep 2013 15:22, "Frédéric THOMAS [via Apache Flex Users]" < > [hidden email]> wrote: > >> Btw, a cool thing you can do if you didn't yet, is to create another >> maven module with the FU4.1, mockolate and whatever the test libs you >> need + the base code and utilities as sources and include that lib as >> dependency of the module you want to add tests and maven scoping this >> lib > as "test" > >> indeed. >> >> -Fred >> >> -----Message d'origine----- >> De : Frédéric THOMAS [mailto:[hidden >> email]<http://user/SendEmail.jtp?type=node&node=2561&i=0>] >> >> Envoyé : mardi 3 septembre 2013 18:12 >> À : [hidden email] <http://user/SendEmail.jtp?type=node&node=2561&i=1> >> Objet : RE: AW: AW: how to setup and use maven-flex-plugin >> >> That wasn't generated, that's one year I use FM6, I just picked it up >> from one of my project but even with those minimum dep, it should work: >> >> <dependencies> >> <dependency> >> <groupId>com.adobe.flash.framework</groupId> >> <artifactId>playerglobal</artifactId> >> <version>${playerglobal.version}</version> >> <type>rb.swc</type> >> </dependency> >> <dependency> >> <groupId>com.adobe.flex.framework</groupId> >> <artifactId>flex-framework</artifactId> >> <version>${flex.version}</version> >> <type>pom</type> >> </dependency> >> </dependencies> >> >> I've project working with FM6.x + FU4.1 + Mockolate too. >> >> -Fred >> >> -----Message d'origine----- >> De : akessner [mailto:[hidden >> email]<http://user/SendEmail.jtp?type=node&node=2561&i=2>] >> Envoyé : mardi 3 septembre 2013 17:57 À : [hidden >> email]<http://user/SendEmail.jtp?type=node&node=2561&i=3>Objet : Re: >> AW: AW: how to setup and use maven-flex-plugin >> >> That is great, thank you! >> It works 99% (can't get mockolate to pass a test though, but I think >> I'll have to do that tommorow) >> >> Can you explain how you generated that pom file? (I tried using the >> generate archetype from the flexmojos wiki) >> >> >> Chris, >> Yes, you did!! I did not notice the flash instead of flex until now, >> but now that I look I see all the files are there! ARG! >> brought to you by the letters A, V, and I and the number 47 >> >> >> On Tue, Sep 3, 2013 at 6:32 PM, Frédéric THOMAS [via Apache Flex >> Users] <[hidden email] > <http://user/SendEmail.jtp?type=node&node=2561&i=4>> wrote: > >> >> > I quickly built a project with your SDK version mavenized, this is >> > the >> > pom.xml: >> > >> > <?xml version="1.0" encoding="UTF-8"?> <project >> > xmlns="http://maven.apache.org/POM/4.0.0" >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 >> > http://maven.apache.org/xsd/maven-4.0.0.xsd"> >> > <modelVersion>4.0.0</modelVersion> >> > >> > <groupId>testMaven</groupId> >> > <artifactId>testMaven</artifactId> >> > <version>1.0-SNAPSHOT</version> >> > >> > <packaging>swf</packaging> >> > >> > <properties> >> > <flexmojos.version>6.0.1</flexmojos.version> >> > <flex.version>4.1.0.16076A</flex.version> >> > <playerglobal.version>10.1</playerglobal.version> >> > <flashplayer.version>10.1</flashplayer.version> >> > <flex.debug>true</flex.debug> >> > </properties> >> > >> > <build> >> > <sourceDirectory>src/main/flex</sourceDirectory> >> > <testSourceDirectory>src/test/flex</testSourceDirectory> >> > <resources> >> > <resource> >> > <directory>src/main/resources</directory> >> > <filtering>true</filtering> >> > <includes> >> > <include>**/*</include> >> > </includes> >> > </resource> >> > </resources> >> > <plugins> >> > <plugin> >> > <groupId>net.flexmojos.oss</groupId> >> > <artifactId>flexmojos-maven-plugin</artifactId> >> > <version>${flexmojos.version}</version> >> > <extensions>true</extensions> >> > <configuration> >> > <storepass/> >> > <targetPlayer>10.1</targetPlayer> >> > <debug>${flex.debug}</debug> >> > <defines> >> > <property> >> > <name>CONFIG::debugging</name> >> > <value>${flex.debug}</value> >> > </property> >> > <property> >> > <name>CONFIG::versionNumber</name> >> > <value>'${project.version}'</value> >> > </property> >> > </defines> >> > </configuration> >> > <dependencies> >> > <dependency> >> > <groupId>com.adobe.flex</groupId> >> > <artifactId>compiler</artifactId> >> > <version>${flex.version}</version> >> > <type>pom</type> >> > </dependency> >> > </dependencies> >> > </plugin> >> > </plugins> >> > </build> >> > >> > <dependencies> >> > <dependency> >> > <groupId>com.adobe.flex.framework.themes</groupId> >> > <artifactId>halo</artifactId> >> > <version>${flex.version}</version> >> > <scope>theme</scope> >> > <type>swc</type> >> > </dependency> >> > >> > <dependency> >> > <groupId>com.adobe.flash.framework</groupId> >> > <artifactId>playerglobal</artifactId> >> > <version>${playerglobal.version}</version> >> > <type>swc</type> >> > </dependency> >> > <dependency> >> > <groupId>com.adobe.flash.framework</groupId> >> > <artifactId>playerglobal</artifactId> >> > <version>${playerglobal.version}</version> >> > <type>rb.swc</type> >> > </dependency> >> > <dependency> >> > <groupId>com.adobe.flex.framework</groupId> >> > <artifactId>flash-integration</artifactId> >> > <version>${flex.version}</version> >> > <type>swc</type> >> > </dependency> >> > <dependency> >> > <groupId>com.adobe.flex.framework</groupId> >> > <artifactId>flex-framework</artifactId> >> > <version>${flex.version}</version> >> > <type>pom</type> >> > </dependency> >> > <dependency> >> > <groupId>com.adobe.flex.framework</groupId> >> > <artifactId>flash-integration</artifactId> >> > <version>${flex.version}</version> >> > <type>rb.swc</type> >> > </dependency> >> > </dependencies> >> > </project> >> > >> > >> > ________________________________ >> > If you reply to this email, your message will be added to the >> > discussion >> > below: >> > http://apache-flex-users.2333346.n4.nabble.com/how-to-setup-and-use- >> > ma ven-flex-plugin-tp1491p2546.html To unsubscribe from how to setup >> > and use maven-flex-plugin, click here. >> > NAML >> >> >> >> >> -- >> View this message in context: >> http://apache-flex-users.2333346.n4.nabble.com/how-to-setup-and-use-ma >> ven-flex-plugin-tp1491p2549.html Sent from the Apache Flex Users >> mailing list archive at Nabble.com. >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion >> below: >> >> http://apache-flex-users.2333346.n4.nabble.com/how-to-setup-and-use-ma >> ven-flex-plugin-tp1491p2561.html To unsubscribe from how to setup and >> use maven-flex-plugin, click >> here<http://apache-flex-users.2333346.n4.nabble.com/template/NamlServl >> et.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=n >> abble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNa >> mespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subs >> cribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-sen >> d_instant_email%21nabble%3Aemail.naml> >> > > > > > -- > View this message in context: > http://apache-flex-users.2333346.n4.nabble.com/how-to-setup-and-use-maven-fl > ex-plugin-tp1491p2562.html > Sent from the Apache Flex Users mailing list archive at Nabble.com. > > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://apache-flex-users.2333346.n4.nabble.com/how-to-setup-and-use-maven-flex-plugin-tp1491p2567.html > To unsubscribe from how to setup and use maven-flex-plugin, click here. > NAML -- View this message in context: http://apache-flex-users.2333346.n4.nabble.com/how-to-setup-and-use-maven-flex-plugin-tp1491p2659.html Sent from the Apache Flex Users mailing list archive at Nabble.com.
