0

我有一个包含 Flexmojos 4.0-beta-7 和多个模块的项目。

有一个带有 swc 打包和一些测试的神器。

在 Maven 安装阶段,它会创建以下 MXML 文件

/target/test-classes/TestRunner.mxml

<?xml version="1.0" encoding="utf-8"?>
<unitestingsupport:TestApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    xmlns:unitestingsupport="net.flexmojos.oss.unitestingsupport.*"
    layout="absolute"
    initialize="init()" 
    port="59896" 
    controlPort="59895" 
    >
    <mx:Script>
        <![CDATA[
import projekt.service.command.CommandServiceTest; CommandServiceTest;
import projekt.service.command.impl.CommandTest; CommandTest;
import projekt.service.console.ConsoleLogTargetTest; ConsoleLogTargetTest;
import projekt.service.dump.dumper.ServiceDumperTest; ServiceDumperTest;

private function init():void {
    addTest( CommandServiceTest);
    addTest( CommandTest);
    addTest( ConsoleLogTargetTest);
    addTest( ServiceDumperTest);
}
        ]]>
    </mx:Script>
</unitestingsupport:TestApplication>

所以 Flexmojos 4.0-beta-7 的阶段运行良好,产生以下输出。

 [exec] [INFO] --- flexmojos-maven-plugin:4.0-beta-7:test-compile (default-test-compile) @ Projekt ---
 [exec] [INFO] Flexmojos 4.0-beta-7
 [exec] [INFO]   Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
 [exec] [INFO] Compiling test class: [projekt.service.command.CommandServiceTest, projekt.service.command.impl.CommandTest, projekt.service.console.ConsoleLogTargetTest, projekt.service.dump.dumper.ServiceDumperTest]
 [exec] Writing configuration dump to C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner-configs.xml
 [exec] C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.swf (1181091 bytes)
 [exec] [INFO] 
 [exec] [INFO] --- flexmojos-maven-plugin:4.0-beta-7:test-run (default-test-run) @ Projekt ---

但是后来我不得不将它升级到 Flexmojos 7.0.1,因为 FLEXMOJOS-886 https://flexmojos.atlassian.net/browse/FLEXMOJOS-886

不幸的是,它打破了阶段,产生了以下输出。

最初它以相同的方式开始

 [exec] [INFO] --- flexmojos-maven-plugin:7.0.1:test-compile (default-test-compile) @ Projekt ---
 [exec] [INFO] Flexmojos 7.0.1
 [exec] [INFO]   GPL License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
 [exec] [INFO] Compiling test class: [projekt.service.command.CommandServiceTest, projekt.service.command.impl.CommandTest, projekt.service.console.ConsoleLogTargetTest, projekt.service.dump.dumper.ServiceDumperTest]

但随后它失败并显示以下消息。

Writing configuration dump to C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner-configs.xml
C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.mxml(30): Error: Cannot resolve attribute 'layout' for component type net.flexmojos.oss.unitestingsupport.TestApplication.
C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.mxml(30): Error: Cannot resolve attribute 'initialize' for component type net.flexmojos.oss.unitestingsupport.TestApplication.
C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.mxml(30): Error: Cannot resolve attribute 'port' for component type net.flexmojos.oss.unitestingsupport.TestApplication.
C:\Users\Uzer\Documents\Projekt\target\test-classes\TestRunner.mxml(30): Error: Cannot resolve attribute 'controlPort' for component type net.flexmojos.oss.unitestingsupport.TestApplication.

如何修复它并使其与 Flexmojos 7.0.1 一起使用,有什么想法吗?

4

0 回答 0