我有一个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-886,我不得不将其升级到Flexmojos 7.0.1 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,任何想法?