FlexMojos est pas tout à fait stable, plus nous ne pouvons pas passer à Maven 3 pour diverses raisons. Nous avons fini par compiler les classes à inclure. Voici un exemple.
< fileset id = "test.src.loc.fileset" dir = "$ {} test.src.loc" >
< comprennent name = "/Test*.as"/>
< comprennent name = " /*TestCase.as"/>
</fileset >
< path id = "test.src.loc.path" >
< pathelement location = "$ {test.src.loc}"/>
</chemin >
< propriété name = "test.src.loc.path" refid = "test.src.loc.path"/>
< pathconvert pathsep = "; importation "property =" test.runner.imports "refid = "test.src.loc.fileset" >
<chainedmapper>
< globmapper de =" $ {test.src. loc.path} \ "to = ""/ >
< packagemapper de =" .comme "to =" "/ >
</chainedmapper >
</pathconvert >
< pathconvert pathsep =", "=" propriété test.runner.calls "refid =" test.src .loc.fileset » > <chainedmapper>
< globmapper de = "$ {} test.src.loc.path \" à = ""/>
< packagemapper de = ".as" to = ""/>
</chainedmapper >
</pathconvert >
< copie TOFILE = "$ {} test.runner" file = "$ {} test.runner.template" Écraser = "true"/>
< = fichier Replace "$ {} test.runner" jeton = "# IMPORTS #" value = "$ {test.runner.imports}"/> < remplacez file = "$ {test.runner}" token = "# APPELS #" valeur = "$ {test.runner.calls} "/ >
< fileset id =" main.src.loc.fileset "dir = "$ {} main.src.loc" >
< comprennent name =" com/classes//*.as "/ >
< excluent name = "com/autres/classes/"/ >
</fileset >
< chemin id =" main.src.loc.path ">
< pathelement location =" $ {main.src.loc} "/ >
</chemin >
< property name = "main.src.loc.path" refid = "main.src.loc.path"/>
< pathconvert pathsep = » "property =" main.src.loc. classes "refid =" main.src.loc.fileset » >
<chainedmapper>
< globmapper de = "$ {} main.src.loc.path \" à = ""/ >
< packagemapper à partir de = ".as" to = ""/>
</chainedmapper >
</pathconvert >
< fileset id = "library.path" dir = "$ {basedir}" >
< comprennent name = "$ {flexcover. framework.loc}/cadres/libs/SWC "/ >
< comprennent name =" $ {} flexcover.framework.loc/fr ameworks/locale/en_US/ SWC "/ >
< comprennent name = "$ {} unit.test.lib.loc/SWC"/ >
< comprennent name =" $ {lib.loc}/ SWC "/ >
</fileset >
< pathconvert pathsep =" "property =" library.path » refid = "library.path"/ >
< exécutable exec = "$ {} mxmlc.exe" dir = "$ {} main.src.loc" >
< ligne arg = "$ {test.runner}"/>
< ligne arg = "- sortie $ {test.finalName}"/>
< ligne de arg = "- source path $ {main.src.loc} $ {} test.src.loc $ {main.src.loc} /../ locale/en_US $ {test.src.loc} /../ resources "/ >
< ligne arg = "- library-path $ {library.path}"/>
< ligne arg = "- en_US"/>
< ligne arg = » -inclut $ {main.src.loc.des classes} »/ >
< ligne arg = "- verbeux-stacktraces = true"/ >
</exec >