当前位置: 首页 > 知识库问答 >
问题:

maven flex生成失败

吴品
2023-03-14

我试图在Eclipse中构建一个包含两个模块的maven项目,一个是Java代码,另一个是flex代码。

安装的maven版本是3.3.9,jdk是JDK7_U80。

maven install-x命令给了我以下错误:

[DEBUG]从ClassRealm[Project>Project.Project:prjt-flex:01.00.00,Parent:ClassRealm[maven.api,Parent:null]][ERROR]内部错误:java.lang.ClassCastException:java.lang.String不能转换为org.apache.maven.lifecycle.mapping.lifecycle.phase->[Help 1]org.apache.maven.internalerrorexception:内部错误:java.lang.ClassCastException:java.lang.String不能转换为VA:606)在org.codehaus.plexus.classworlds.launcher.launchEnhanced(launcher.java:289)在org.codehaus.plexus.classworlds.launcher.launcher.launcher(launcher.java:229)在org.codehaus.plexus.classworlds.launcher.launcher.mainithexitcode(launcher.java:415)在org.codehaus.plexus.classworlds.launcher.launcher.main(launcher.java:356)由:

这个问题似乎来自模块flex,在下面的pom.xml中:

<properties>
        <flex.version>4.5.1.21328</flex.version>
        <template.dir>src/main/html-template</template.dir> 
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <flexmojos.version>4.0-RC2</flexmojos.version>      
    </properties>
    <build>
        <sourceDirectory>src/main/flex</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>${flexmojos.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <fullSynchronization>true</fullSynchronization>
                    <showWarnings>false</showWarnings>
                    <optimize>true</optimize>
                    <allowSourcePathOverlap>true</allowSourcePathOverlap>
                    <sourceFile>flexprojt.mxml</sourceFile>
                    <output>target/flexprojt.swf</output>                   
                    <localesCompiled>                       
                        <locale>en_US</locale>
                    </localesCompiled>
                    <includeStylesheets>
                        <stylesheet>
                            <name>style.css</name>
                            <path>assets/css</path>
                        </stylesheet>
                    </includeStylesheets>
                    <localesSourcePath>locale/{locale}</localesSourcePath>
                    <compilerSourcePath>
                        <path>src/main/flex</path>
                    </compilerSourcePath>
                    <rslUrls>
                        <rsl>{artifactId}_{version}.{extension}</rsl>
                    </rslUrls>
                    <targetPlayer>${flash.version}</targetPlayer>
                    <fonts>
                        <advancedAntiAliasing>true</advancedAntiAliasing>
                        <maxCachedFonts>20</maxCachedFonts>
                        <maxGlyphsPerFace>1000</maxGlyphsPerFace>
                        <managers>
                            <manager>flash.fonts.JREFontManager</manager>
                            <manager>flash.fonts.AFEFontManager</manager>
                            <manager>flash.fonts.BatikFontManager</manager> 
                            <manager>flash.fonts.CFFFontManager</manager>                           
                        </managers>
                    </fonts>
                    <modules>
                        <module>
                            <sourceFile>context.mxml</sourceFile>
                            <finalName>context</finalName>
                            <destinationPath>/</destinationPath>
                        </module>
                    </modules>
                </configuration>
                <executions> 
                    <execution> 
                        <goals> 
                            <goal>wrapper</goal> 
                        </goals> 
                        <configuration>
                            <templateURI>folder:html-template</templateURI>
                            <parameters> 
                                <swf>${project.build.finalName}</swf> 
                                <width>100%</width> 
                                <height>100%</height> 
                            </parameters>
                        </configuration> 
                    </execution> 
                </executions> 
                <dependencies>
                    <dependency>
                        <groupId>org.sonatype.flexmojos</groupId>
                        <artifactId>flexmojos-threadlocaltoolkit-wrapper</artifactId>
                        <version>${flexmojos.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>${flex.version}</version>
                        <type>pom</type>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.flex.compiler</groupId>
                        <artifactId>flex-fontkit</artifactId>
                        <version>${flex.version}</version>
                        <type>jar</type>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.flex.compiler</groupId>
                        <artifactId>afe</artifactId>
                        <version>${flex.version}</version>
                        <type>jar</type>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.flex.compiler</groupId>
                        <artifactId>aglj40</artifactId>
                        <version>${flex.version}</version>
                        <type>jar</type>
                    </dependency>
                    <dependency>
                        <groupId>com.adobe.cairngorm</groupId>
                        <artifactId>cairngorm3</artifactId>
                        <version>3.0.21</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.3.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.5</version>
            </plugin>
        </plugins>
    </build>

共有2个答案

颛孙越
2023-03-14

您应该将IDE指向使用外部安装(在操作系统上)的maven版本,而不是使用绑定的maven。

咸弘雅
2023-03-14

我通过使用Maven3.1.1版本构建项目来修复这个问题。

但我还是想用3.3.9版本构建它,而且我不知道我需要哪个版本的flex编译器。

 类似资料:
  • com.android.ide.common.Process.processException:org.gradle.Process.internal.execexception:Process'command'd:\users\user4\appdata\local\android\sdk2\build-tools\21.1.2\aapt.exe''已完成,退出值为非零1

  • 我试图在android studio模拟器上运行我的react原生项目,但当我构建它时,出现了这个错误: 任务“:App:SigningConfigWriterDebug”执行失败。accessDeniedException:d:\courses\reactNative-thePracticalGuide\myFirstApp\android\app\build\intermediates\sig

  • 当我尝试构建Cordova Android应用程序时,它会以 环境变量是: ANDROID\u SDK\u ROOT-- 那么,您能帮我解决这个问题吗?请提前感谢:)

  • 我正在获取javax.net.ssl.sslHandShakeException:Sun.Security.Validator.ValidatorException:PKIX路径构建失败:Sun.Security.Provider.CertPath.SunCertPathBuilderException:找不到请求目标的有效认证路径异常,如何解决?这是我的密钥库

  • 编译: 生成失败 d:\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\BUILD.xml:601:执行此行时出现以下错误: d:\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\BUILD.xml:720:执行此行时出现以下错误: d:\adt-bundle-windows-x86_64-2013