我的 Flex 应用程序出现了连线问题,确切地说是菜单(基于 mx.controls.Menu 和 flexlib.controls.ScrollableMenu)。
当我通过 FlashBuilder 菜单构建我的应用程序时。看截图:
但是当我使用 flexmojos-sonatype-plugin 由 maven 构建它时,菜单被破坏(它没有根据 labelField 属性正确呈现,并且它没有捕获任何事件,如鼠标单击)。看截图:
我的 .actionScriptProperties 文件:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties analytics="false" mainApplicationPath="ats.mxml" projectUUID="802474ea-5e3c-4d2c-bdaa-8c263c0828f4" version="6">
<compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="false" copyDependentFiles="true" flexSDK="Flex 3.3" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderLocation="D:/flex" outputFolderPath="bin-debug" rootURL="http://localhost:8080/flex/" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<compilerSourcePath />
<libraryPath defaultLinkType="1">
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation/3.3.0.4852/automation-3.3.0.4852.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation_agent/3.3.0.4852/automation_agent-3.3.0.4852.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation_dmv/3.3.0.4852/automation_dmv-3.3.0.4852.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation_flashflexkit/3.3.0.4852/automation_flashflexkit-3.3.0.4852.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation_agent/3.3.0.4852/automation_agent-3.3.0.4852-en_US.rb.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/automation/3.3.0.4852/automation-3.3.0.4852-en_US.rb.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flexunit/flexunit/0.90/flexunit-0.90.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/adobe/flex/framework/as3corelib/0.92.1/as3corelib-0.92.1.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="3" linkType="1" path="d:/apps/.m2/repo/com/google/code/flexlib/flexlib/2.6-M3/flexlib-2.6-M3.swc" useDefaultLinkType="true"/>
<libraryPathEntry kind="4" path="">
<modifiedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" useDefaultLinkType="true"/>
</modifiedEntries>
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_dmv.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_agent.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
</libraryPath>
<sourceAttachmentPath>
<sourceAttachmentPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" sourcepath="${PROJECT_FRAMEWORKS}/source" useDefaultLinkType="false"/>
</sourceAttachmentPath>
</compiler>
<applications>
<application path="myApp.mxml"/>
</applications>
<modules/>
<buildCSSFiles/>
</actionScriptProperties>
我的有效 POM 文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.application.myApp</groupId>
<artifactId>myApp</artifactId>
<version>trunk-SNAPSHOT</version>
<packaging>swf</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.code.flexlib</groupId>
<artifactId>flexlib</artifactId>
<version>2.6-M3</version>
<type>swc</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.code.flexlib</groupId>
<artifactId>flexlib</artifactId>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>3.3.0.4852</version>
<type>pom</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>playerglobal</artifactId>
<groupId>com.adobe.flex.framework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>3.3.0.4852</version>
<type>swc</type>
<classifier>10</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flexunit</groupId>
<artifactId>flexunit</artifactId>
<version>0.90</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>as3corelib</artifactId>
<version>0.92.1</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>datavisualization</artifactId>
<version>3.3.0.4852</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-lightweight</artifactId>
<version>1.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.0-RC2</version>
<extensions>true</extensions>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>sources</goal>
</goals>
<configuration>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<compilerWarnings>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
<execution>
<id>swf-optimization</id>
<goals>
<goal>optimize-swf</goal>
</goals>
<configuration>
<attachOriginalArtifact>false</attachOriginalArtifact>
<reduce>false</reduce>
<reduceMergeABC>false</reduceMergeABC>
<reduceMergeCF>false</reduceMergeCF>
<reduceSortCPool>false</reduceSortCPool>
<strip>false</strip>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<compilerWarnings>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>license</artifactId>
<version>3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-flex3-compatibility-layer</artifactId>
<version>4.0-RC2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>3.3.0.4852</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>adt</artifactId>
<version>3.3.0.4852</version>
<scope>compile</scope>
</dependency>
</dependencies>
<configuration>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<compilerWarnings>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0</version>
<configuration>
<allowTimestampedSnapshots>true</allowTimestampedSnapshots>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.0-RC2</version>
<extensions>true</extensions>
<executions>
<execution>
<id>default-compile-swf</id>
<phase>compile</phase>
<goals>
<goal>compile-swf</goal>
</goals>
<configuration>
<sourceFile>myApp.mxml</sourceFile>
<ignoreVersionIssues>true</ignoreVersionIssues>
<skipTests>true</skipTests>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
<show-binding-warnings>false</show-binding-warnings>
<warn-duplicate-variable-def>false</warn-duplicate-variable-def>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
<execution>
<phase>package</phase>
<goals>
<goal>sources</goal>
</goals>
<configuration>
<sourceFile>myApp.mxml</sourceFile>
<ignoreVersionIssues>true</ignoreVersionIssues>
<skipTests>true</skipTests>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
<show-binding-warnings>false</show-binding-warnings>
<warn-duplicate-variable-def>false</warn-duplicate-variable-def>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
<execution>
<id>swf-optimization</id>
<goals>
<goal>optimize-swf</goal>
</goals>
<configuration>
<attachOriginalArtifact>false</attachOriginalArtifact>
<reduce>false</reduce>
<reduceMergeABC>false</reduceMergeABC>
<reduceMergeCF>false</reduceMergeCF>
<reduceSortCPool>false</reduceSortCPool>
<strip>false</strip>
<sourceFile>myApp.mxml</sourceFile>
<ignoreVersionIssues>true</ignoreVersionIssues>
<skipTests>true</skipTests>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
<show-binding-warnings>false</show-binding-warnings>
<warn-duplicate-variable-def>false</warn-duplicate-variable-def>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>license</artifactId>
<version>3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-flex3-compatibility-layer</artifactId>
<version>4.0-RC2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>3.3.0.4852</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>adt</artifactId>
<version>3.3.0.4852</version>
<scope>compile</scope>
</dependency>
</dependencies>
<configuration>
<sourceFile>ats.mxml</sourceFile>
<ignoreVersionIssues>true</ignoreVersionIssues>
<skipTests>true</skipTests>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
<show-binding-warnings>false</show-binding-warnings>
<warn-duplicate-variable-def>false</warn-duplicate-variable-def>
<assignmentWithinConditional>true</assignmentWithinConditional>
<constructorReturnsValue>true</constructorReturnsValue>
<duplicateArgumentNames>true</duplicateArgumentNames>
<duplicateVariableDef>true</duplicateVariableDef>
<noConstructor>true</noConstructor>
</compilerWarnings>
<actionscriptFileEncoding>UTF-8</actionscriptFileEncoding>
<licenses>
<flexbuilder3>...</flexbuilder3>
</licenses>
<targetPlayer>10.2.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<localesCompiled>
<locale>en_US</locale>
</localesCompiled>
<verboseStacktraces>true</verboseStacktraces>
<generateHtmlWrapper>false</generateHtmlWrapper>
<enableM2e>false</enableM2e>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我发现使用 MonsterDebugger 在运行时 Menu 对象和它的 MenuItemRenderers 被创建。
我正在使用 Flex SDK 3.3、FlashBuilder 4、Maven 3.0.5、flexmojos-maven-plugin 4.0-RC2。你知道用 FlashBuilder 和 Maven 构建我的应用程序有什么区别吗?感谢您的回复。