【发布时间】:2015-10-28 02:12:21
【问题描述】:
我正在将使用 Adobe Flex 4.6 和 FlexMojos 4 的应用程序迁移到 Apache Flex 4.14 和 FlexMojos 7。当我尝试执行“mvn build”时,我收到了这个错误:
[ERROR] Unresolveable build extension: Plugin net.flexmojos.oss:flexmojos-maven-plugin:7.0.1 or one of its dependencies could not be resolved:
The following artifacts could not be resolved:
org.apache.flex.compiler:mxmlc:jar:4.12.1.20140427,
org.apache.flex.compiler:digest:jar:4.12.1.20140427,
org.apache.flex.compiler:optimizer:jar:4.12.1.20140427,
org.apache.flex.compiler:asdoc:jar:4.12.1.20140427,
org.apache.flex.compiler:swcdepends:jar:4.12.1.20140427,
org.apache.flex:compiler:pom:4.12.1.20140427: Failure to find
org.apache.flex.compiler:mxmlc:jar:4.12.1.20140427 in
http://repository.sonatype.org/content/groups/flexgroup/ was cached in the local repository, resolution will not be reattempted until the update interval of flex-mojos-repository has elapsed or updates are forced -> [Help 2]
[ERROR] Unknown packaging: swf @ line 5, column 13
这是我的 pom.xml:
<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>
<groupId>com.cognifit.cognifitSocialFlex</groupId>
<artifactId>FlexCognifit</artifactId>
<packaging>swf</packaging>
<name>cognifitSocialFlex</name>
<version>11.0.2.10</version>
<properties>
<flex.version>4.14.1.20150325</flex.version>
<flashplayer.version>11.1</flashplayer.version>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<directory>${project.basedir}/target/${project.version}</directory>
<plugins>
<plugin>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>7.0.1</version>
<extensions>true</extensions>
<configuration>
<sourceFile>CpcSocialFlex.mxml</sourceFile>
<swfVersion>13</swfVersion>
<targetPlayer>11.1.0</targetPlayer>
<localesCompiled>
<locale>ar_MA</locale>
<locale>de_AT</locale>
<locale>de_CH</locale>
<locale>de_DE</locale>
<locale>el_GR</locale>
<locale>en_US</locale>
<locale>en_ZA</locale>
<locale>es_ES</locale>
<locale>es_MX</locale>
<locale>fr_FR</locale>
<locale>he_IL</locale>
<locale>it_IT</locale>
<locale>ja_JP</locale>
<locale>ko_KR</locale>
<locale>nl_NL</locale>
<locale>pt_BR</locale>
<locale>pt_PT</locale>
<locale>ru_RU</locale>
<locale>sr_RS</locale>
<locale>tr_TR</locale>
<locale>zh_CN</locale>
<locale>zh_HK</locale>
</localesCompiled>
<dependencies>
<dependency>
<groupId>org.apache.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.flex</groupId>
<artifactId>framework</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flash.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>${flashplayer.version}</version>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework.themes</groupId>
<artifactId>halo</artifactId>
<type>swc</type>
<scope>theme</scope>
<version>${flex.version}</version>
</dependency>
</dependencies>
</project>
我正在使用 Maven 3.2.5 和 Java 1.6.0_14:
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T12:29:23-05:00)
Maven home: /usr/local/maven
Java version: 1.6.0_14, vendor: Sun Microsystems Inc.
Java home: /usr/java/jdk1.6.0_14/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "2.6.21.7-2.fc8xen", arch: "i386", family: "unix"
这些是我遵循的步骤:
我下载了带有安装程序的 Apache Flex SDK:
- Apache Flex SDK 4.14.1
- AIR 18.0
- Flash 播放器 18
我已经使用 Mavenizer 创建了这个 SDK 的 Maven 版本:
然后我在 /root/.m2/repository/ 文件夹中部署了 mavenized 版本,并使用 pom.xml 执行 mvn compile。
【问题讨论】:
-
过去几周我一直在努力研究 Flexmojos 和 Converter,所以请您检查一下: a) 生成的版本是 4 段 ...新版本应该只生成 3 段版本"4.12.1" b) 你切换到sdk转换器的开发分支了吗? c) 你看过我最近写的文档吗? cwiki.apache.org/confluence/display/FLEX/…
-
感谢您的提问,我已经放弃了 FlexMojos,因为我认为该项目已停止。如果我在 Google 中输入“FlexMojos”,第一个结果会将我带到文档,而最新版本的文档为空:flexmojos.atlassian.net/wiki/display/FLEXMOJOS/Flexmojos+7.x
-
嗯,我是唯一一个真正在工作的人,而且我的 Atlassian 页面确实存在很多权限问题,所以我开始重新编写 Apache Flex Wiki 上的文档。原作者删除了 google 邮件列表,我将支持转移到了 Apache Flex 邮件列表。 7.1.0 版(Still SNAPSHOT)已经充满了很酷的功能。请问你用的是什么代替?
-
使用 Unix 脚本直接从 Apache SDK 调用 mxmlc 进行直接编译。谢谢你的努力!为什么 Adobe 没有在这方面使用更多资源?他们没有帮助 Flex 抵抗……
-
现在,Adobe 正在走一条不同的道路。这就是他们首先将 Flex 捐赠给 Apache 的原因……我们很高兴他们为该项目提供了至少一名全职开发人员免费使用 Flex,所以这是一个很大的帮助。因此,如果您想再次尝试 Flexmojos,我很乐意为您提供帮助。
标签: apache-flex flex4 flexmojos flex-mojos flex4.10