【问题标题】:Flex-Mojo/Flex-compiler version issues with Flex 4.1 and maven2Flex 4.1 和 maven2 的 Flex-Mojo/Flex-compiler 版本问题
【发布时间】:2010-06-25 20:22:28
【问题描述】:

我的项目 UI 是使用 Flex4.1 构建的。我正在使用 maven2 并试图找出我应该使用哪个 flex-mojo 版本进行编译。

我尝试了以下,

<flex.sdk.version>4.1.0.16076</flex.sdk.version>
<flex.mojo.version>3.6.1</flex.mojo.version>

但我遇到了问题..

[INFO] Flex compiler and flex framework versions doesn't match. Compiler: '3.2.0.3958' - Framework: '4.1.0.16076'. You can use 'ignoreVersionIssues' to disable this check. Please refer to Flexmojos maven doc. If you prefer fixing it instead of ignoring, take a look at: @987654321@ [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.BuildFailureException: Flex compiler and flex framework versions doesn't match. Compiler: '3.2.0.3958' - Framework: '4.1.0.16076'. You can use 'ignoreVersionIssues' to disable this check. Please refer to Flexmojos maven doc. If you prefer fixing it instead of ignoring, take a look at: @987654322@ at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:699) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoFailureException: Flex compiler and flex framework versions doesn't match. Compiler: '3.2.0.3958' - Framework: '4.1.0.16076'. You can use 'ignoreVersionIssues' to disable this check. Please refer to Flexmojos maven doc.

不太清楚为什么它将编译器版本称为“3.2.0.3958”,尽管我已将编译器版本定义为与“flex.sdk.version”相同。我的插件看起来像

       <plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>  
            <version>${flex.mojo.version}</version>  
            <extensions>true</extensions>
            <configuration>
                <!--
                <linkReport>true</linkReport>
                <configurationReport>true</configurationReport>
                -->
                <locales>
                    <param>en_US</param>
                </locales>
                <sourcePaths>
                    <path>${project.build.sourceDirectory}</path>
                </sourcePaths>
                <contextRoot>${project.parent.artifactId}</contextRoot>
                <showWarnings>false</showWarnings>
                <debug>true</debug>
                <keepGeneratedActionscript>false</keepGeneratedActionscript>
                <incremental>true</incremental>
                <!-- <ignoreVersionIssues>true</ignoreVersionIssues> -->
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>com.adobe.flex</groupId>
                    <artifactId>compiler</artifactId>
                    <version>${flex.sdk.version}</version>
                    <type>pom</type>
                </dependency>
            </dependencies>
        </plugin>

有人可以帮忙吗?

【问题讨论】:

  • 抱歉回复晚了,应该更经常地检查这里的问题... Flexmojos 3.6.1 ... Velo 做了数百个错误修复,我继续修复直到版本 7.0.1 的内容。如果您遇到问题,我建议您更新到最新版本。否则,这有点像帮助有 Java 1.0.7 应用程序问题的人

标签: maven-2 flex4 flex-mojos


【解决方案1】:

嗯,我花了一天的大部分时间试图弄清楚同样的事情。最后,我遇到了这个:

由于 flexmojos 是一个扩展,它会在构建之前被下载 开始将 swc/swf 打包支持分配到内存中。

我决定项目中的其他东西(这是巨大的)正在为 flex4 配置 flexmojo(我试图构建一个旧的 flex3 模块)并且我正在获取这个内存配置插件。因此,我找到了另一个正确构建的 flex3 组件,并更改了我的 flexmojo 版本以匹配该组件。有效。 maven 必须为该插件的每个版本保留一个插件的内存实例是有道理的。

所以,尝试更改您的 flexmojo 版本号(我从 1.6.1 更改为 1.5.0)

谢谢

【讨论】:

    【解决方案2】:

    试试这个

    <?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>
    
    <parent>
        <groupId>org.springframework.flex.samples</groupId>
        <artifactId>spring-flex-testdrive</artifactId>
        <version>1.0.3.RELEASE</version>
    </parent>
    
    <artifactId>collaboration</artifactId>
    <packaging>swf</packaging>
    
    <name>Collaboration Sample</name>
    
    <build>
        <finalName>collaboration</finalName>
        <sourceDirectory>src/main/flex</sourceDirectory>
        <testSourceDirectory>src/test/flex</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>3.6.1</version>
                <extensions>true</extensions>
                <executions>
                  <execution>
                    <goals>
                      <goal>wrapper</goal>
                    </goals>
                  </execution>
                </executions>
    
                <configuration>
                    <output>${basedir}/../testdrive/src/main/webapp/${project.build.finalName}/${project.build.finalName}.swf</output>
                    <services>${basedir}/../testdrive/src/main/webapp/WEB-INF/flex/services-config.xml</services>
                    <contextRoot>/testdrive</contextRoot>
                    <locales>
                        <locale>en_US</locale>
                    </locales>
                     <targetPlayer>10.0.0</targetPlayer> 
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>4.0.0.14159</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
    
            </plugin>
        </plugins>
    </build>
    
    <dependencies>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flex-framework</artifactId>
            <version>4.0.0.14159</version>
            <type>pom</type>
        </dependency>
    
    
        <!-- flexmojos Unit testing support -->
        <!--
            <dependency> <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-unittest-support</artifactId>
            <version>3.2.0</version> <type>swc</type> <scope>test</scope>
            </dependency>
        -->
    </dependencies>
    
     </project>
    

    【讨论】:

    • 我尝试根据你的 pom 进行更改,但仍然没有成功..同样的错误..即使我运行 'mvn dependency:tree',我也没有找到对 Compiler:'3.2. 0.3958'
    猜你喜欢
    • 1970-01-01
    • 2019-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-09
    • 1970-01-01
    相关资源
    最近更新 更多