Could not resolve <fx:Script> to a component implementation.

Posted by seref on Stack Overflow See other posts from Stack Overflow or by seref
Published on 2011-03-05T13:41:25Z Indexed on 2011/03/05 15:24 UTC
Read the original article Hit count: 931

Filed under:
|
|
|
|

Hi, i created project with flexmojos maven archtype..i used flexmojos:flexbuilder and compile/run with FlashBuilder 4 everything is okay but when i try to compile project with flexmojos i got following error:


[ERROR] Z:....\src\main\flex\Main.mxml:[6,-1] Could not resolve < fx:Script > to a component implementation.

[INFO] BUILD FAILURE


my mxml:

<?xml version="1.0" encoding="utf-8"?> 
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
xmlns:s="library://ns.adobe.com/flex/spark" 
                           xmlns:mx="library://ns.adobe.com/flex/mx" 
                                width="100%" height="100%" 
creationComplete="application1_creationCompleteHandler(event)"> 
        <fx:Script> 
                <![CDATA[ 
                        import mx.controls.Alert; 
                        import mx.events.FlexEvent; 
                        protected function 
application1_creationCompleteHandler(event:FlexEvent):void 
                        { 
                                Alert.show("success!!!!") 
                        } 
        ]]></fx:Script> 
</s:Application> 

pom.xml like:

...... 
<packaging>swf</packaging> 
...... 
        <properties> 
                <flex-sdk.version>4.1.0.16076</flex-sdk.version> 
                <flexmojos.version>3.8</flexmojos.version> 
        </properties> 
...... 
<build> 
                <sourceDirectory>src/main/flex</sourceDirectory> 
                <testSourceDirectory>src/test/flex</testSourceDirectory> 
                <plugins> 
                        <plugin> 
                                <groupId>org.sonatype.flexmojos</groupId> 
                                <artifactId>flexmojos-maven-plugin</artifactId> 
                                <version>${flexmojos.version}</version> 
                                <extensions>true</extensions> 
                                <dependencies> 
                                        <dependency> 
                                                <groupId>com.adobe.flex</groupId> 
                                                <artifactId>compiler</artifactId> 
                                                <version>${flex-sdk.version}</version> 
                                                <type>pom</type> 
                                        </dependency> 
                                </dependencies> 
                                <configuration> 
                                        <compiledLocales> 
                                                <locale>en_US</locale> 
                                        </compiledLocales> 
                                        <mergeResourceBundle>true</mergeResourceBundle> 
                                        <accessible>true</accessible> 
                                        <optimize>true</optimize> 
                                        <targetPlayer>10.0.0</targetPlayer> 
                                        <showWarnings>true</showWarnings> 
                                        <linkReport>true</linkReport> 
                                </configuration> 
                        </plugin> 
                </plugins> 
        </build> 
        <dependencies> 
                <!-- Flex framework resource bundles --> 
                <dependency> 
                        <groupId>com.adobe.flex.framework</groupId> 
                        <artifactId>flex-framework</artifactId> 
                        <version>${flex-sdk.version}</version> 
                        <type>pom</type> 
                </dependency> 
                <!-- Include unit test dependencies. --> 
                <dependency> 
                        <groupId>com.adobe.flexunit</groupId> 
                        <artifactId>flexunit</artifactId> 
                        <version>4.0-rc-1</version> 
                        <type>swc</type> 
                        <scope>test</scope> 
                </dependency> 
        </dependencies> 
.......

maven output compiler config :

INFO] Flex compiler configurations: 
-compiler.external-library-path C:\...\.m2\repository\com\adobe\flex 
\framework\playerglobal\4.1.0.16076\10.0\playerglobal.swc 
-compiler.include-libraries= 
-compiler.library-path C:\...\.m2\repository\com\adobe\flex\framework 
\datavisualization\4.1.0.16076\datavisualization-4.1.0.16076.swc C:\... 
\.m2\repository\com\adobe\flex\framework\flash-integration 
\4.1.0.16076\flash-integration-4.1.0.16076.swc C:\...\.m2\repository 
\com\adobe\flex\framework\flex\4.1.0.16076\flex-4.1.0.16076.swc C:\... 
\.m2\repository\com\adobe\flex\framework\framework 
\4.1.0.16076\framework-4.1.0.16076.swc C:\...\.m2\repository\com\adobe 
\flex\framework\osmf\4.1.0.16076\osmf-4.1.0.16076.swc C:\... 
\.m2\repository\com\adobe\flex\framework\rpc 
\4.1.0.16076\rpc-4.1.0.16076.swc C:\...\.m2\repository\com\adobe\flex 
\framework\spark\4.1.0.16076\spark-4.1.0.16076.swc C:\... 
\.m2\repository\com\adobe\flex\framework\sparkskins 
\4.1.0.16076\sparkskins-4.1.0.16076.swc C:\...\.m2\repository\com\adobe 
\flex\framework\textLayout\4.1.0.16076\textLayout-4.1.0.16076.swc C: 
\...\.m2\repository\com\adobe\flex\framework\utilities 
\4.1.0.16076\utilities-4.1.0.16076.swc C:\...\.m2\repository\com\adobe 
\flex\framework\datavisualization 
\4.1.0.16076\datavisualization-4.1.0.16076-en_US.rb.swc C:\... 
\.m2\repository\com\adobe\flex\framework\framework 
\4.1.0.16076\framework-4.1.0.16076-en_US.rb.swc C:\...\.m2\repository 
\com\adobe\flex\framework\osmf\4.1.0.16076\osmf-4.1.0.16076- 
en_US.rb.swc C:\...\.m2\repository\com\adobe\flex\framework\rpc 
\4.1.0.16076\rpc-4.1.0.16076-en_US.rb.swc C:\...\.m2\repository\com 
\adobe\flex\framework\spark\4.1.0.16076\spark-4.1.0.16076-en_US.rb.swc 
C:\...\.m2\repository\com\adobe\flex\framework\textLayout 
\4.1.0.16076\textLayout-4.1.0.16076-en_US.rb.swc C:\...\.m2\repository 
\com\adobe\flex\framework\flash-integration\4.1.0.16076\flash- 
integration-4.1.0.16076-en_US.rb.swc C:\...\.m2\repository\com\adobe 
\flex\framework\playerglobal\4.1.0.16076\playerglobal-4.1.0.16076- 
en_US.rb.swc 
-compiler.theme Z:\.....\target\classes\configs\themes\Spark 
\spark.css 
-compiler.accessible=true 
-compiler.allow-source-path-overlap=false 
-compiler.as3=true 
-compiler.debug=false 
-compiler.es=false 
-compiler.fonts.managers flash.fonts.JREFontManager 
flash.fonts.BatikFontManager flash.fonts.AFEFontManager 
flash.fonts.CFFFontManager 
-compiler.fonts.local-fonts-snapshot Z:\.....\target\classes 
\fonts.ser 
-compiler.keep-generated-actionscript=false 
-licenses.license flashbuilder4 952309948800588759250406 
-licenses.license flexbuilder4.displayedStartPageAtLeastOneTime true 
-compiler.locale en_US 
-compiler.optimize=true 
-compiler.source-path Z:\.....\src\main\flex 
-compiler.strict=true 
-use-network=true 
-compiler.verbose-stacktraces=false 
-compiler.actionscript-file-encoding UTF-8 
-target-player 10.0.0 
-default-background-color 8821927 
-default-frame-rate 24 
-default-script-limits 1000 60 
-default-size 500 375 
-compiler.headless-server=false 
-compiler.keep-all-type-selectors=false 
-compiler.use-resource-bundle-metadata=true 
-metadata.date Fri Mar 04 14:04:37 EET 2011 
-metadata.localized-title Main x-default 
-verify-digests=true 
-compiler.namespaces.namespace+=http://ns.adobe.com/mxml/2009,Z:\..... 
\target\classes\config-4.1.0.16076\mxml-2009-manifest.xml 
-compiler.namespaces.namespace+=library://ns.adobe.com/flex/spark,Z: 
\.....\target\classes\config-4.1.0.16076\spark-manifest.xml 
-compiler.namespaces.namespace+=library://ns.adobe.com/flex/mx,Z:\..... 
\target\classes\config-4.1.0.16076\mx-manifest.xml 
-compiler.namespaces.namespace+=http://www.adobe.com/2006/mxml,Z:\..... 
\PozitronUI\target\classes\config-4.1.0.16076\mxml-manifest.xml - 
static-link-runtime-shared-libraries=false -load-config= 
-metadata.language+=en_US 

any help...

regards,

© Stack Overflow or respective owner

Related posts about flex

Related posts about compiler