2011-05-28 81 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