我通过在现有的flex应用程序中添加一些新功能来发现flex world和maven,我可能肯定做错了但我不知道是什么。 我正在使用flexmojo来管理flex编译,当我尝试激活另一种语言(spanich,意大利语或塞尔维亚语)时,我遇到了一些错误。它就像法语德语和英语的魅力一样
这是我的pom.xml:
<configuration>
<targetPlayer>10.0.0</targetPlayer>
<incremental>true</incremental>
<verboseStacktraces>false</verboseStacktraces>
<optimize>true</optimize>
<showWarnings>false</showWarnings>
<debug>false</debug>
<strict>true</strict>
<compiledLocales>
<locale>fr_FR</locale>
<locale>es_ES</locale>
<locale>de_DE</locale>
<locale>it_IT</locale>
<locale>en_US</locale>
<locale>rs_SR</locale>
</compiledLocales>
<themes>
<theme>${project.build.directory}/generated-resources/flex/themes/spark-theme.css</theme>
<theme>${project.build.directory}/generated-resources/flex/themes/halo-theme.swc</theme>
</themes>
<!-- il faut indiquer ou est le fichier services-config.xml -->
<services>${project.build.directory}/generated-resources/flex/services-config.xml</services>
<!-- url context de l'application java qui sera appelee-->
<contextRoot>idApp</contextRoot>
<useNetwork>true</useNetwork>
<allowSourcePathOverlap>true</allowSourcePathOverlap>
<sourcePaths>
<path>${basedir}/src/main/resources/locale/{locale}</path>
<path>${basedir}/src/main/flex/</path>
<path>${basedir}/src/test/</path>
</sourcePaths>
<sourceFile>idApp.mxml</sourceFile>
<skipTests>true</skipTests>
</configuration>
在我的config.xml文件中,我使用相同的语言:
<?xml version="1.0" encoding="UTF-8"?>
<IDTRELConfig>
<service endpoint="http://localhost:8080/idApp/messagebroker/amf" />
<languages>
<fr enable="true" />
<en enable="true" />
<es enable="true" />
<de enable="true" />
<it enable="true" />
<sr enable="true" />
</languages>
</IDTRELConfig>
当我在eclispe中执行以下命令时:
clean install -Dmaven.test.skip -Dmaven.javadoc.skip
我收到以下错误:
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.200 s
[INFO] Finished at: 2015-03-11T18:24:45+01:00
[INFO] Final Memory: 15M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:3.8:compile-swf (default-compile-swf) on project idApp: Failure to find com.adobe.flex.framework:datavisualization:rb.swc:rs_SR:4.1.0.16076 in http://download.java.net/maven/2 was cached in the local repository, resolution will not be reattempted until the update interval of java.net2 has elapsed or updates are forced
[ERROR]
[ERROR] Try downloading the file manually from the project website.
答案 0 :(得分:1)
请使用区域设置链。问题是你定义的语言flex-framework没有默认的语言环境。因此编译器只要想要包含flex resource-bundes的serbian语言环境就会抱怨。最简单的解决方案是将英语设置为任何不具备塞尔维亚语资源的后备资源。
<compiledLocales>
<locale>fr_FR</locale>
<locale>es_ES</locale>
<locale>de_DE</locale>
<locale>it_IT</locale>
<locale>en_US</locale>
<locale>rs_SR,en_US</locale>
</compiledLocales>
通过这种方式,编译器将使用您提供的塞尔维亚语,并在您错过塞尔维亚语资源的任何地方使用美国英语。
详情请见此处:https://cwiki.apache.org/confluence/display/FLEX/Adding+I18N+support+to+your+application了解详情