1

当我尝试运行覆盖率报告时,Flexmojos 当前冻结。

我已经尝试按照这篇文章中给出的方式构建项目。

我尝试使用多个版本的 flexmojos 4.0 beta 构建项目。使用提供的示例和我自己的尝试。

我当前的 pom.xml 文件看起来像这样。

<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>info.rvin.itest</groupId>
    <artifactId>flexunit4</artifactId>
    <version>1.0-SNAPSHOT</version>

    <packaging>swc</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>4.0-beta-7</version>
                <extensions>true</extensions>
                <configuration>
<!--                    <coverage>true</coverage>-->
                    <locales>
                        <locale>en_US</locale>
                    </locales>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flex-framework</artifactId>
            <version>4.5.0.19786</version>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>com.adobe.flexunit</groupId>
            <artifactId>flexunit</artifactId>
            <version>4.0.0</version>
            <type>swc</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flexunit</groupId>
            <artifactId>flexunit-uilistener</artifactId>
            <version>4.0.0</version>
            <type>swc</type>
        </dependency>
    </dependencies>

</project>

当覆盖线未注释时,这不起作用。以下是控制台输出。

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building calculator-api 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ calculator-api ---
[INFO] Deleting C:\dev\workspace\flexmojos\Flexmojos-flexmojos-e78b1b1\flexmojos-touchstone\coverage\target
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ calculator-api ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\dev\workspace\flexmojos\Flexmojos-flexmojos-e78b1b1\flexmojos-touchstone\coverage\src\main\resources
[INFO] 
[INFO] --- flexmojos-maven-plugin:4.0-beta-7:compile-swc (default-compile-swc) @ calculator-api ---
[INFO] Flexmojos 4.0-beta-7
[INFO]   Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[WARNING] No themes are explicitly defined in the <theme> section or in any scope="theme" dependencies. Flexmojos is now attempting to figure out which themes to include. (to avoid this warning you should explicitly state your theme dependencies)
[WARNING] Added the spark.css theme because spark.swc was included as a dependency
[WARNING] Added the halo.swc theme because mx.swc was included as a dependency
[INFO] Writing configuration dump to C:\dev\workspace\flexmojos\Flexmojos-flexmojos-e78b1b1\flexmojos-touchstone\coverage\target\calculator-api-1.0-SNAPSHOT-configs.xml
[INFO] C:\dev\workspace\flexmojos\Flexmojos-flexmojos-e78b1b1\flexmojos-touchstone\coverage\target\calculator-api-1.0-SNAPSHOT.swc (1891 bytes)
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ calculator-api ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\dev\workspace\flexmojos\Flexmojos-flexmojos-e78b1b1\flexmojos-touchstone\coverage\src\test\resources
[INFO] 
[INFO] --- flexmojos-maven-plugin:4.0-beta-7:test-compile (default-test-compile) @ calculator-api ---
[INFO] Flexmojos 4.0-beta-7
[INFO]   Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[INFO] Compiling test class: [com.adobe.example.TestCalculator, com.adobe.example.TestCalculator2]
[WARNING] No themes are explicitly defined in the <theme> section or in any scope="theme" dependencies. Flexmojos is now attempting to figure out which themes to include. (to avoid this warning you should explicitly state your theme dependencies)
[WARNING] Added the spark.css theme because spark.swc was included as a dependency
[WARNING] Added the halo.swc theme because mx.swc was included as a dependency
[INFO] Writing configuration dump to C:\dev\workspace\flexmojos\Flexmojos-flexmojos-e78b1b1\flexmojos-touchstone\coverage\target\test-classes\TestRunner-configs.xml
[INFO] C:\dev\workspace\flexmojos\Flexmojos-flexmojos-e78b1b1\flexmojos-touchstone\coverage\target\test-classes\TestRunner.swf (810352 bytes)
[INFO] 
[INFO] --- flexmojos-maven-plugin:4.0-beta-7:test-run (default-test-run) @ calculator-api ---
[INFO] Flexmojos 4.0-beta-7
[INFO]   Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[INFO] Instrumenting: C:\dev\workspace\flexmojos\Flexmojos-flexmojos-e78b1b1\flexmojos-touchstone\coverage\target\test-classes\TestRunner.swf
Terminate batch job (Y/N)? 

它总是挂在最后一行。

是否有任何已知的使用覆盖报告的 flexmojos 工作示例?

注意 存储库已移至 github,因此文章中的直接链接无法正常工作。存储库名为 flexmojos/flexmojos。

其他人也有同样的 问题

4

1 回答 1

2

更新:Velo 刚刚发布了 4.0-RC1 - 覆盖范围开箱即用。请参阅以下仅供参考 - 升级到 4.0-RC1 以避免任何黑客攻击。

在 4.0-beta-7 中,覆盖使用 apparat v1.0.RC7 并且覆盖被破坏 - 永远挂起。

Velo 将对 Apparat 的依赖提高到 1.0-RC9 版本(从 1.0.RC7 开始),一切似乎都正常。要在您的版本中尝试此操作,您可以执行以下操作:

编辑 flexmojos-parent.pom(来自 .m2 存储库中的 org.sonatype.flexmojos.flexmojos-parent)并切换您在其中看到的 Appart 版本。

当然,这不是一个真正的解决方案——您只是在做一个变通方法,直到 Flexmojos 的下一个版本发布。(https://groups.google.com/d/topic/flex-mojos/hYo91mjazv0/overview

与此同时,唯一的其他选择是从 GIT 获取最新的 FM 源代码,然后从源代码构建您自己的 Flexmojos 版本(这需要相当多的工作)。我见过的最好的资源是:

http://dev.c-ware.de/confluence/display/PUBLIC/Building+Flexmojos+4+from+Source+%28GIT%29

于 2011-07-14T21:19:23.260 回答