2011-05-28 63 views
1

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

我试过在this post中给出建设项目。

我试着用多个版本的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。其他人有sameproblem

+0

Flash Player的弹出,当你到达代码覆盖部分? – 2011-05-29 13:11:34

+0

@J_A_X没有它没有。否则,我会查找错误消息。 – Wes 2011-05-30 13:28:19

+0

然后我认为这是问题所在。 Flex Mojos需要让投影机运行swf。确保您的系统路径中有Flash Player(投影机)的路径,并确保将swf文件关联到该Flash Player。 – 2011-05-30 15:14:09

回答

2

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

在4.0-beta-7中,覆盖范围使用的设备v1.0.RC7和覆盖范围被打破 - 永远悬挂。

Velo将Apparat的依赖性提升到版本1.0-RC9(来自1.0.RC7),并且一切似乎都奏效。要在您的版本试试这个,你可以做到以下几点:

编辑的Flexmojos-parent.pom(从您的回购的.m2 org.sonatype.flexmojos.flexmojos父)和开关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