无法解析到组件实现

发布于 2024-10-20 11:08:28 字数 18122 浏览 7 评论 0原文

我使用 flexmojos maven archtype 创建了项目..我使用了 flexmojos:flexbuilder 并使用 FlashBuilder 4 编译/运行一切都很好,但是当我尝试时 使用 flexmojos 编译项目时出现以下错误:


[错误] Z:....\src\main\flex\Main.mxml:[6,-1] 无法解析 < fx:脚本>到组件实现。

[信息] 构建失败


我的 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 类似:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.foo</groupId>
    <artifactId>Bar</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>swf</packaging>

    <name>Foobar</name>

    <properties>
        <flex-sdk.version>4.1.0.16076</flex-sdk.version>
        <flex-sdk.scope>compile</flex-sdk.scope>
        <flexmojos.version>3.8</flexmojos.version>
        <player.version>10.0</player.version>
    </properties>
    <pluginRepositories>
        <!--
            Required for regular plugin use until moved over to Maven central
            repo.
        -->
        <pluginRepository>
            <id>flex-mojos-plugin-repository</id>
            <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>

        <!-- Required for building plugin from source. -->
        <pluginRepository>
            <id>flex-mojos-internal-plugins-repository</id>
            <url>http://repository.sonatype.org/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>


    <repositories>
        <!--
            Required for regular plugin use until moved over to Maven central
            repo.
        -->
        <repository>
            <id>flex-mojos-repository</id>
            <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>

        <!-- Required for building plugin from source. -->
        <repository>
            <id>flex-mojos-internal-repository</id>
            <url>http://repository.sonatype.org/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>apache-internal-repository</id>
            <url>https://repository.apache.org/content/repositories/maven-014/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <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>
                    <accessible>false</accessible>
                    <targetPlayer>${player.version}</targetPlayer>
                    <incremental>false</incremental>
                    <debug>false</debug>
                    <locale>en_US</locale>
                    <optimize>true</optimize>
                    <showWarnings>true</showWarnings>
                    <strict>true</strict>
                    <useNetwork>true</useNetwork>
                    <allowSourcePathOverlap>true</allowSourcePathOverlap>
                    <sourcePaths>
                        <path>${basedir}/src/main/flex</path>
                    </sourcePaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-config</id>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- Flex framework resource bundles -->
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>playerglobal</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <classifier>${player.version}</classifier>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>playerglobal</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>textLayout</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>osmf</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>framework</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>spark</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>sparkskins</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>rpc</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>datavisualization</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flash-integration</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flex</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>framework</artifactId>
            <version>${flex-sdk.version}</version>
            <type>zip</type>
            <classifier>configs</classifier>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>utilities</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>datavisualization</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flash-integration</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>framework</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>osmf</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>rpc</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>spark</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>textLayout</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>

</dependencies>

</project>

maven 输出编译器配置:

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 

任何帮助...

问候,

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:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.foo</groupId>
    <artifactId>Bar</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>swf</packaging>

    <name>Foobar</name>

    <properties>
        <flex-sdk.version>4.1.0.16076</flex-sdk.version>
        <flex-sdk.scope>compile</flex-sdk.scope>
        <flexmojos.version>3.8</flexmojos.version>
        <player.version>10.0</player.version>
    </properties>
    <pluginRepositories>
        <!--
            Required for regular plugin use until moved over to Maven central
            repo.
        -->
        <pluginRepository>
            <id>flex-mojos-plugin-repository</id>
            <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>

        <!-- Required for building plugin from source. -->
        <pluginRepository>
            <id>flex-mojos-internal-plugins-repository</id>
            <url>http://repository.sonatype.org/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>


    <repositories>
        <!--
            Required for regular plugin use until moved over to Maven central
            repo.
        -->
        <repository>
            <id>flex-mojos-repository</id>
            <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>

        <!-- Required for building plugin from source. -->
        <repository>
            <id>flex-mojos-internal-repository</id>
            <url>http://repository.sonatype.org/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>apache-internal-repository</id>
            <url>https://repository.apache.org/content/repositories/maven-014/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <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>
                    <accessible>false</accessible>
                    <targetPlayer>${player.version}</targetPlayer>
                    <incremental>false</incremental>
                    <debug>false</debug>
                    <locale>en_US</locale>
                    <optimize>true</optimize>
                    <showWarnings>true</showWarnings>
                    <strict>true</strict>
                    <useNetwork>true</useNetwork>
                    <allowSourcePathOverlap>true</allowSourcePathOverlap>
                    <sourcePaths>
                        <path>${basedir}/src/main/flex</path>
                    </sourcePaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-config</id>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <phase>generate-resources</phase>
                        <configuration>
                            <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- Flex framework resource bundles -->
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>playerglobal</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <classifier>${player.version}</classifier>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>playerglobal</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>textLayout</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>osmf</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>framework</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>spark</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>sparkskins</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>rpc</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>datavisualization</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flash-integration</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flex</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>framework</artifactId>
            <version>${flex-sdk.version}</version>
            <type>zip</type>
            <classifier>configs</classifier>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>utilities</artifactId>
            <version>${flex-sdk.version}</version>
            <type>swc</type>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>datavisualization</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flash-integration</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>framework</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>osmf</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>rpc</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>spark</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>textLayout</artifactId>
            <version>${flex-sdk.version}</version>
            <type>rb.swc</type>
            <scope>${flex-sdk.scope}</scope>
        </dependency>

</dependencies>

</project>

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,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟柳画桥 2024-10-27 11:08:29

您的 POM 文件中缺少某些依赖项。 (框架、火花、火花皮,...)
这是我的一个项目的摘录:

<dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>playerglobal</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <classifier>${flash.player.major}</classifier>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>playerglobal</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>textLayout</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>                
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>osmf</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>                
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>framework</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>spark</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>sparkskins</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>rpc</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>datavisualization</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>flash-integration</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>flex</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>framework</artifactId>
          <version>${flex.sdk.version}</version>
          <type>zip</type>
          <classifier>configs</classifier>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>utilities</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>datavisualization</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>flash-integration</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>framework</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>osmf</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>                
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>rpc</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>                
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>spark</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>textLayout</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
    </dependencies>

Some dependencies are missing in your POM file. (framework, spark, sparkskins, ...)
Here is an excerpt of ony of my project :

<dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>playerglobal</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <classifier>${flash.player.major}</classifier>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>playerglobal</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>textLayout</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>                
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>osmf</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>                
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>framework</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>spark</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>sparkskins</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>rpc</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>datavisualization</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>flash-integration</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>flex</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>framework</artifactId>
          <version>${flex.sdk.version}</version>
          <type>zip</type>
          <classifier>configs</classifier>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>utilities</artifactId>
          <version>${flex.sdk.version}</version>
          <type>swc</type>
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>datavisualization</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>flash-integration</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>framework</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>osmf</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>                
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>rpc</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>                
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>spark</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>textLayout</artifactId>
          <version>${flex.sdk.version}</version>
          <type>rb.swc</type>
          <scope>${flex.sdk.scope}</scope>        
        </dependency>
    </dependencies>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文