首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Flexmojos覆盖率示例

Flexmojos覆盖率示例
EN

Stack Overflow用户
提问于 2011-05-28 12:08:57
回答 1查看 1.8K关注 0票数 1

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

我试着按照这个职位中给出的方式构建这个项目。

我尝试过用多个版本的Flexmojos4.0beta构建这个项目。使用所提供的示例和我自己的尝试。

我当前的pom.xml文件如下所示。

代码语言:javascript
复制
<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>

当覆盖率行未注释时,这是不起作用的。下面是控制台输出。

代码语言:javascript
复制
[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。

其他人有相同的 问题

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-07-14 21:19:23

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

在4.0-贝塔-7,覆盖使用仪器v1.0.RC 7和覆盖被打破-永远挂。

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

编辑flexmojos-parent.pom (来自org.sonatype.Flexmojos.Flexmojos-- .m2 repo中的父版本),并切换您在其中看到的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

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6161547

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档