You're still using FlexMojos 3.0.0 for the main plugin, based on that pom,
because your plugin's <version> tag does not reference ${flexmojos.version};
it is explicitly set to 3.0.0.

On Mon, Oct 18, 2010 at 12:57 PM, kei <[email protected]> wrote:

> Thank you VELO,
>
> I tried FlexUnit 0.9 instead of 4.  The combination of versions is:
>  <flash.version>9</flash.version>
>  <flex.sdk.version>3.4.0.9271</flex.sdk.version>
>  <flexmojos.version>3.7.1</flexmojos.version>
>  <flexunit.version>0.9</flexunit.version>
>
> Then, I got a different error:
>
> ...
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 0 resource
> [INFO] [flexmojos:test-compile {execution: default-test-compile}]
> [INFO] Flexmojos 3.7.1
> [INFO]   Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT
> file
> [INFO] Compiling test class: [sampleSuite.TestSuite]
> [INFO] [flexmojos:test-run {execution: default-test-run}]
> [INFO] Flexmojos 3.7.1
> [INFO]   Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT
> file
> [INFO] Running tests ****\FlexUnitTest\target\test-classes
> \TestRunner.swf
> [WARNING] [LAUNCHER] Using regular flashplayer tests
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Time Elapsed: 0 sec
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Invalid state: the flashplayer is closed, but the sockets still
> running...
>
> I see a window popping up before the error.
>
> Here is my new pom.xml.
>
> Regards,
>
> Kei
>
>
> <?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> **** </groupId>
>                <artifactId> *** </artifactId>
>                <version> ***-SNAPSHOT</version>
>        </parent>
>        <groupId>sampleCase.tests</groupId>
>        <artifactId>flexunit4</artifactId>
>        <name>FlexUnit</name>
>        <packaging>swc</packaging>
>        <properties>
>          <flash.version>9</flash.version>
>          <flex.sdk.version>3.4.0.9271</flex.sdk.version>
>          <flexmojos.version>3.7.1</flexmojos.version>
>          <flexunit.version>0.9</flexunit.version>
>        </properties>
>          <build>
>            <sourceDirectory>src/main/flex</sourceDirectory>
>            <testSourceDirectory>src/test/flex</testSourceDirectory>
>            <pluginManagement>
>              <plugins>
>                <plugin>
>                  <groupId>org.sonatype.flexmojos</groupId>
>                  <artifactId>flexmojos-maven-plugin</artifactId>
>                  <version>3.0.0</version>
>                  <extensions>true</extensions>
>                                <configuration>
>                                        <moduleFiles>
>
>  <module>sampleCase/tests/TestProgram.mxml</module>
>                                        </moduleFiles>
>                                        <includeTestFiles>
>
>  <includeTestFile>sampleSuite/TestSuite.as</includeTestFile>
>                                        </includeTestFiles>
>
>  <targetPlayer>${flash.version}</targetPlayer>
>                                        <packaging>maven-plugin</packaging>
>                                </configuration>
>                </plugin>
>              </plugins>
>            </pluginManagement>
>            <!-- To use the plugin goals in your POM or parent POM -->
>            <plugins>
>              <plugin>
>                <groupId>org.servebox.flex</groupId>
>                <artifactId>flex-plugin</artifactId>
>                <version>2.3.2</version>
>              </plugin>
>            </plugins>
>          </build>
>        <dependencies>
>                <dependency>
>                        <groupId>flexunit</groupId>
>                        <artifactId>flexunit</artifactId>
>                        <version>${flexunit.version}</version>
>                        <type>swc</type>
>                </dependency>
>                <dependency>
>                        <groupId>com.adobe.flex</groupId>
>                        <artifactId>compiler</artifactId>
>                        <version>${flex.version}</version>
>                        <type>pom</type>
>                </dependency>
>                <dependency>
>                        <groupId>org.sonatype.flexmojos</groupId>
>                        <artifactId>flexmojos-unittest-support</artifactId>
>                        <type>swc</type>
>                        <scope>test</scope>
>                        <version>3.3.0</version>
>                </dependency>
>                <dependency>
>                        <groupId>com.adobe.flex.framework</groupId>
>                        <artifactId>playerglobal</artifactId>
>                        <version>${flex.sdk.version}</version>
>                        <classifier>${flash.version}</classifier>
>                        <type>swc</type>
>                </dependency>
>        </dependencies>
> </project>
>
>
>
> On Oct 16, 3:52 pm, Marvin Froeder <[email protected]> wrote:
> > Flexmojos 3.0.0 doesn't support FlexUnit 4
> >
>  > On Sat, Oct 16, 2010 at 7:50 PM, Kei Yuasa <[email protected]> wrote:
> > > By mistake, I sent this question from my another e-mail.  I am posting
> > > from my registered e-mail address.
> >
> > > I am trying to execute FlexUnit4 from Maven using flexmojos.
> >
> > > I created pom.xml (below) and tried "mvn test".  Then, I get the
> > > following message:
> >
> > > ...
> > > ...
> > > [INFO] Already trust on
> >
> > >
> C:\trunk\iPassSource\OMP\Portal\Presentation\PresentationPrototypes\fxunit\target\test-classes\TestRunner.swf
> > > [INFO] [flexmojos:test-run {execution: default-test-run}] [INFO]
> > > flexmojos 3.0.0 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
> > > [INFO] flexunit setup args: null
> >
> > > Here, a web browser pops up for /target/test-classes/TestRunner.swf,
> > > but shows nothing.  Maven waits for some time, and then gives up with
> > > timeout.
> >
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] Tests run: 0, Failures: 0, Errors: 0, Time Elpased: 0 sec
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [ERROR] BUILD ERROR
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] timeout waiting for flexunit report
> >
> > > Embedded error: Accept timed out
> > > [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] For more information, run Maven with the -e switch [INFO]
> > >
> ------------------------------------------------------------------------
> > > [INFO] Total time: 1 minute 16 seconds
> > > [INFO] Finished at: Fri Oct 15 18:29:29 PDT 2010 [INFO] Final Memory:
> > > 20M/121M [INFO]
> > >
> ------------------------------------------------------------------------
> >
> > > How can I execute my test case (TestSuite.as) from flexmojos?
> >
> > > Here is my pom.xml.  Thanks.
> >
> > > Regards,
> >
> > > Kei
> >
> > > -------------------------------------------
> >
> > > <?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>
> > >    <groupId>org.sonatype.flexmojos</groupId>
> > >    <artifactId>hello-world</artifactId>
> > >    <version>1.0-SNAPSHOT</version>
> > >    <packaging>swf</packaging>
> > >    <build>
> > >        <sourceDirectory>src/main/flex</sourceDirectory>
> > >        <testSourceDirectory>src/test/flex</testSourceDirectory>
> > >         <plugins>
> > >            <plugin>
> > >                <groupId>org.sonatype.flexmojos</groupId>
> > >                <artifactId>flexmojos-maven-plugin</artifactId>
> > >                <version>3.0.0</version>
> > >                <extensions>true</extensions>
> > >                <configuration>
> > >                    <targetPlayer>10.0.0</targetPlayer>
> > >                        <headlessServer>true</headlessServer>
> > >                        <verboseStacktraces>true</verboseStacktraces>
> > >                        <includeTestFiles>
> >
> > >  <includeTestFile>TestSuite.as</includeTestFile>
> > >                        </includeTestFiles>
> > >                 </configuration>
> > >            </plugin>
> > >        </plugins>
> > >    </build>
> >
> > >    <repositories>
> > >        <repository>
> > >            <id>flexmojos-repository</id>
> > >            <url>http://repository.sonatype.org/content/groups/public/
> > > </url>
> > >        </repository>
> > >    </repositories>
> > >    <pluginRepositories>
> > >        <pluginRepository>
> > >            <id>flexmojos-repository</id>
> > >            <url>http://repository.sonatype.org/content/groups/public/
> > > </url>
> > >        </pluginRepository>
> > >    </pluginRepositories>
> >
> > >    <dependencies>
> > >        <dependency>
> > >            <groupId>com.adobe.flex.framework</groupId>
> > >            <artifactId>flex-framework</artifactId>
> > >            <version>3.4.0.9271</version>
> > >            <type>pom</type>
> > >            <exclusions>
> > >                <exclusion>
> > >                    <groupId>com.adobe.flex.framework</groupId>
> > >                    <artifactId>playerglobal</artifactId>
> > >                </exclusion>
> > >            </exclusions>
> > >        </dependency>
> > >        <dependency>
> > >            <groupId>com.adobe.flex.framework</groupId>
> > >            <artifactId>playerglobal</artifactId>
> > >            <version>3.4.0.9271</version>
> > >            <classifier>10</classifier>
> > >            <type>swc</type>
> > >        </dependency>
> > >        <dependency>
> > >                        <groupId>org.sonatype.flexmojos</groupId>
> > >                <artifactId>flexmojos-unittest-support</artifactId>
> > >                <type>swc</type>
> > >                <scope>test</scope>
> > >                <version>3.2.0</version>
> > >        </dependency>
> > >        <dependency>
> > >                <groupId>org</groupId>
> > >                        <artifactId>flexunit</artifactId>
> > >                        <version>4.0.0</version>
> > >            <type>swc</type>
> > >        </dependency>
> > >    </dependencies>
> > > </project>
> >
> > > Other files are simple.  TestSuite
> > > package
> > > {
> > >        [Suite]
> > >        [RunWith( "org.flexunit.runners.Suite" )]
> > >        public class TestSuite
> > >        {
> > >                public var addTester:AddTester;
> >
> > >                public function TestSuite() {}
> > >        }
> > > }
> >
> > > --
> > > 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]<flex-mojos%[email protected]>
> <flex-mojos%[email protected]<flex-mojos%[email protected]>
> >
>  > > For more options, visit this group at
> > >http://groups.google.com/group/flex-mojos
> >
> > >http://flexmojos.sonatype.org/
> >
> >
>
> --
> 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]<flex-mojos%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/flex-mojos
>
> http://flexmojos.sonatype.org/
>

-- 
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

http://flexmojos.sonatype.org/

Reply via email to