Flex-Mojo/Flex-compiler 版本问题与 Flex 4.1 和 maven2
我的项目 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 编译器和 Flex 框架版本不匹配。编译器:“3.2.0.3958”-框架:“4.1.0.16076”。 您可以使用“ignoreVersionIssues”来禁用此检查。请参阅 Flexmojos maven 文档。 如果您更喜欢修复它而不是忽略它,请查看:https://docs.sonatype.org/display/FLEXMOJOS/How+to+set+Flex+SDK+version [信息] ---------------------------------------------------------- ------------------------ [信息] 追踪 org.apache.maven.BuildFailureException:Flex编译器和flex框架版本不匹配。编译器:“3.2.0.3958”-框架:“4.1.0.16076”。 您可以使用“ignoreVersionIssues”来禁用此检查。请参阅 Flexmojos maven 文档。 如果您更喜欢修复它而不是忽略它,请查看:https://docs.sonatype.org/display/FLEXMOJOS/How+to+set+Flex+SDK+version 在 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:699) 在org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540) 在org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519) 在org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) 在org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) 在 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) 在 org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) 在 org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) 在 org.apache.maven.cli.MavenCli.main(MavenCli.java:356) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在 java.lang.reflect.Method.invoke(Method.java:597) 在 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) 在 org.codehaus.classworlds.Launcher.launch(Launcher.java:255) 在 org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) 在 org.codehaus.classworlds.Launcher.main(Launcher.java:375) 原因:org.apache.maven.plugin.MojoFailureException:Flex编译器和flex框架版本不匹配。编译器:'3.2.0.3958' - 框架: “4.1.0.16076”。 您可以使用“ignoreVersionIssues”来禁用此检查。请参阅 Flexmojos maven 文档。 不太
清楚为什么它将编译器版本引用为“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>
有人能帮忙吗?
My projects UI is built using Flex4.1..I am using maven2 and trying to figure out which flex-mojo version should I use for compiling.
I tried with the following,
<flex.sdk.version>4.1.0.16076</flex.sdk.version>
<flex.mojo.version>3.6.1</flex.mojo.version>
but am running into issues..
[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: https://docs.sonatype.org/display/FLEXMOJOS/How+to+set+Flex+SDK+version
[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: https://docs.sonatype.org/display/FLEXMOJOS/How+to+set+Flex+SDK+version
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.
Not too sure why it is referring the compiler version as '3.2.0.3958' although I have defined the compiler version same as the "flex.sdk.version". My plugin looks like
<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>
Can anybody help??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,我花了一天的大部分时间试图弄清楚同样的事情。最后,我遇到了这个:
由于flexmojos是一个扩展,它将在构建之前下载
开始将swc/swf打包支持分配到内存中。
我决定项目中的其他东西(这是巨大的)为flex4配置flexmojo(我试图构建一个旧的flex3模块)并且我得到了这个内存中配置的插件。因此,我找到了另一个正确构建的 Flex3 组件,并更改了我的 Flexmojo 版本以匹配该组件。它起作用了。 Maven 必须为该插件的每个版本保留一个插件的内存实例,这是有道理的。
所以,尝试更改你的flexmojo版本号(我从1.6.1更改为1.5.0)
谢谢
Well, I spent the better part of a day trying to figure out the same thing. Finally, I ran across this:
Since flexmojos is an extension, it will be downloaded before the build
start to allocate the swc/swf packaging support into memory.
I decided something else in the project (which is huge) was configuring flexmojo for flex4 (i was trying to build an old flex3 module) and i was getting this in-memory configured plugin. so, I found another flex3 component that was building correctly and changed my flexmojo version to match that one. It worked. It makes sense that maven would have to keep a in-memory instance of the plugin for every version of that plug-in.
So, try changing your flexmojo version number (I changed from 1.6.1 to 1.5.0)
Thanks
试试这个
Try this