flexmojos-maven-plugin:7.0.1:test-compile build failure at net.flexmojos.oss.unitestingsupport.TestApplication

231 views Asked by At

I have a project with Flexmojos 4.0-beta-7 and multiple modules.

There is an artifact with swc packaging and some tests.

During maven install phase it creates the following MXML file

/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>

So the phase on Flexmojos 4.0-beta-7 runs fine, producing the following output.

 [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 ---

But then I have had to upgrade it to Flexmojos 7.0.1 because of FLEXMOJOS-886 https://flexmojos.atlassian.net/browse/FLEXMOJOS-886

Unfortunately, it breaks the phase, producing the following output.

Initially it begins the same way

 [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]

But then it fails with the following messages.

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.

How to fix it and make it work with Flexmojos 7.0.1, any ideas?

0

There are 0 answers