【问题标题】:Adobe flex migration error defaults.css expectedAdobe flex 迁移错误 defaults.css 预期
【发布时间】:2017-01-06 16:43:27
【问题描述】:

我在从 Adob​​e Flex 3.3.0.4852 迁移到 4.5.1.21328

时遇到问题

应用我设置的相同配置会引发异常,执行flexmojos-maven-plugin

<plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>3.2.0</version>
            <extensions>true</extensions>
            <executions>
                <execution>
                    <goals>
                        <goal>compile-swf</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <moduleFiles>
                    <module>APP_MIGRATED.mxml</module>
                </moduleFiles>
                <locales>
                    <param>en_US</param>
                </locales>
                <services>${basedir}/src/main/resources/services-config.xml</services> 
                <contextRoot>root</contextRoot>
                <keepAllTypeSelectors>true</keepAllTypeSelectors>
                <output>${basedir}/target/APP_MIGRATED.swf</output>
                <targetPlayer>9.0.0</targetPlayer>
            </configuration>
        </plugin>

该错误正在尝试编译它引发下一个错误的源:

[错误] C:\m2_repo_clean\com\adobe\flex\framework\advancedgrids\4.5.1.21328\advancedgrids-4.5.1.21328.swc$defaults.css:[13,-1] { 预期的。 [错误] C:\m2_repo_clean\com\adobe\flex\framework\charts\4.5.1.21328\charts-4.5.1.21328.swc$defaults.css:[13,-1] { 预期的。 [错误] C:\m2_repo_clean\com\adobe\flex\framework\charts\4.5.1.21328\charts-4.5.1.21328.swc$defaults.css:[14,-1] { 预期的。 [错误] C:\m2_repo_clean\com\adobe\flex\framework\charts\4.5.1.21328\charts-4.5.1.21328.swc$defaults.css:[108,-1] 意外字符:D. [错误] C:\m2_repo_clean\com\adobe\flex\framework\charts\4.5.1.21328\charts-4.5.1.21328.swc$defaults.css:[112,-1] { 预期的。 [错误] C:\m2_repo_clean\com\adobe\flex\framework\framework\4.5.1.21328\framework-4.5.1.21328.swc$defaults.css:[15,-1] { 预期的。 [错误] C:\m2_repo_clean\com\adobe\flex\framework\mx\4.5.1.21328\mx-4.5.1.21328.swc$defaults.css:[15,-1] { 预期的。 [错误] C:\m2_repo_clean\com\adobe\flex\framework\spark\4.5.1.21328\spark-4.5.1.21328.swc$defaults.css:[15,-1] { 预期的。 [警告] C:\Workspaces\aa_Branches\aa_jdk8_upgrade\flex\src\main\flexapp\APP_MIGRATED.mxml:[0,-1] 不支持 CSS 选择器条件类型:':normalWithPrompt' [警告] C:\Workspaces\aa_Branches\aa_jdk8_upgrade\flex\src\main\flexapp\APP_MIGRATED.mxml:[0,-1] 不支持 CSS 选择器条件类型:':disabledWithPrompt'

这是我的完整 pom 配置

<parent>
    <artifactId>app-migrated</artifactId>
    <groupId>com.appmigrated</groupId>
    <version>1.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>flex</artifactId>
<packaging>pom</packaging>
<name>Flex</name>

<build>
    <finalName>APP_MIGRATED</finalName>
    <sourceDirectory>src/main/flexapp</sourceDirectory>
    <resources>
        <resource>
            <directory>${basedir}/src/main/resources</directory>
        </resource>
        <resource>
            <directory>${basedir}/target/generated-resources</directory>
        </resource>
    </resources>
    <plugins>
        <plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>${flex-mojos.version}</version>
            <extensions>true</extensions>
            <executions>
                <execution>
                    <goals>
                        <goal>compile-swf</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <moduleFiles>
                    <module>APP_MIGRATED.mxml</module>
                </moduleFiles>
                <locales>
                    <param>en_US</param>
                </locales>
                <services>${basedir}/src/main/resources/services-config.xml</services> 
                <contextRoot>root</contextRoot>
                <keepAllTypeSelectors>true</keepAllTypeSelectors>
                <output>${basedir}/target/APP_MIGRATED.swf</output>
                <targetPlayer>9.0.0</targetPlayer>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>3.2.0</version>
            <executions>
                <execution>
                     <goals>
                        <goal>wrapper</goal>
                    </goals>
                    <phase>generate-resources</phase>
                </execution>
            </executions>
            <configuration>
                <ignoreVersionIssues>true</ignoreVersionIssues>
                 <htmlName>APP_MIGRATED</htmlName>
                 <outputDirectory>${project.build.directory}/html-wrapper</outputDirectory> 
           </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>
                        <includeArtifacIds>APP_MIGRATED</includeArtifacIds>
                        <includeGroupIds>${project.groupId}</includeGroupIds>
                        <excludeTransitive>true</excludeTransitive>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
                <execution>
                    <id>make.html-bundle</id>
                    <goals>
                        <goal>single</goal>
                    </goals>
                    <phase>package</phase>
                    <configuration>
                        <descriptors>
                            <descriptor>src/main/assembly/html-bundle.xml</descriptor>
                        </descriptors>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
                <execution>
                    <id>make.resources</id>
                    <goals>
                        <goal>single</goal>
                    </goals>
                    <phase>package</phase>
                    <configuration>
                        <descriptors>
                            <descriptor>src/main/assembly/resources.xml</descriptor>
                        </descriptors>
                    </configuration>
                </execution>
            </executions>
        </plugin>

    </plugins>
</build>

<properties>
  <flex.sdk.version>4.5.1.21328</flex.sdk.version>
    <flex-mojos.version>4.0-RC2</flex-mojos.version>
</properties>

<dependencies>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>flex-framework</artifactId>
        <version>${flex.sdk.version}</version>
        <type>pom</type>
    </dependency>
    <dependency> 
        <groupId>com.adobe.cairngorm</groupId> 
        <artifactId>cairngorm</artifactId> 
        <version>2.2.1</version> 
        <type>swc</type> 
    </dependency>
</dependencies>

我知道在这个错误之后可能会有另一个错误,但这是我更关心的一个。

您好,

【问题讨论】:

    标签: java maven actionscript-3 apache-flex flexmojos


    【解决方案1】:

    试试 flexmojos 7:

    <properties>
        <flexmojos.version>7.0.1</flexmojos.version>
        <flex.version>4.13.0.20140701</flex.version>
        <flash.version>16.0</flash.version>
    </properties>   
    

    插件看起来像这样

    <plugins>
        <plugin>
            <groupId>net.flexmojos.oss</groupId>
             <artifactId>flexmojos-maven-plugin</artifactId>
             <version>${flexmojos.version}</version>
             <extensions>true</extensions>
            <configuration>
             <sourceFile>APP_MIGRATED.mxml</sourceFile>
             <compilerWarnings>
                <warn-no-constructor>false</warn-no-constructor>
             </compilerWarnings>
    
            </configuration>
            <dependencies>
                <!-- This handles a bug in maven which causes problems with flex resources -->
                <dependency>
                    <groupId>net.flexmojos.oss</groupId>
                    <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
                    <version>${flexmojos.version}</version>
                </dependency>
                <!-- Without this FM will use the compiler configured in its master 
                    pom, which will result in version conflicts -->
                <dependency>
                    <groupId>org.apache.flex</groupId>
                    <artifactId>compiler</artifactId>
                    <version>${flex.version}</version>
                    <type>pom</type>
                </dependency>
            </dependencies>     
        </plugin>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-12
      • 2011-10-24
      • 2011-04-04
      • 2013-10-19
      相关资源
      最近更新 更多