apache-flex - flex 4.6 pom 文件依赖没有解决

标签 apache-flex maven flash-builder pom.xml flex4.6

我正在尝试将 flex 4.6 项目转换为 maven 以下是我的 pom.xml

    <build>
        <sourceDirectory>src</sourceDirectory>

        <plugins>

          <plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>4.0-RC2</version>
            <extensions>true</extensions>
            <dependencies>
              <dependency>
                <groupId>com.adobe.flex</groupId>
                <artifactId>compiler</artifactId>
                <version>4.6.0.23201</version>
                <type>pom</type>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <goals>
                  <goal>wrapper</goal>
                </goals>
                <configuration>
                  <parameters>
                    <swf>${build.finalName}</swf>
                    <width>100%</width>
                    <height>100%</height>
                  </parameters>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

      <dependencies>
        <dependency>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>flex-framework</artifactId>
          <version>4.6.0.23201</version>
          <type>pom</type>
        </dependency>
      </dependencies>

  <repositories>
    <repository>
      <id>flexmojos</id>
      <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
    </repository>
  </repositories>

我得到的错误如下:

[ERROR] The project com.adobe:gDash-main-maven:1.0-SNAPSHOT (C:\\pom.xml) has 1 error [ERROR] Unresolveable build extension: Plugin com.adobe.flex.compiler:batik- all-flex:4.6.0.23201 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.adobe.flex.compiler:batik-all-flex:jar :4.6.0.23201, com.adobe.flex:compiler:pom:4.6.0.23201: Could not find artifact com.adobe.flex.compiler:batik-all-flex:jar:4.6.0.23201 in central (http://repo.ma ven.apache.org/maven2) -> [Help 2] org.apache.maven.plugin.PluginResolutionException: Plugin com.adobe.flex.compile r:batik-all-flex:4.6.0.23201 or one of its dependencies could not be resolved: T he following artifacts could not be resolved: com.adobe.flex.compiler:batik-all- flex:jar:4.6.0.23201, com.adobe.flex:compiler:pom:4.6.0.23201: Could not find ar tifact com.adobe.flex.compiler:batik-all-flex:jar:4.6.0.23201 in central (http://repo.maven.apache.org/maven2)

最佳答案

我也面临同样的问题。将此添加到您的 pom.xml文件(例如在 <repositories>...</repositories> 之后):

<pluginRepositories>
    <pluginRepository>
        <id>flex-mojos-plugin-repository</id>
       <url>http://repository.sonatype.org/content/groups/flexgroup</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

为我解决了:)

一些 IDE 会生成一个已经包含这个插件库的 POM 文件。

关于apache-flex - flex 4.6 pom 文件依赖没有解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15114613/

相关文章:

apache-flex - flex 4 组中的中心元素

java - 在没有 Adob​​e Air 的情况下在 Android 中安装 Air 应用程序

java - 无法加载 sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo

java - Flash Builder 4.7 中 Flex/Java 应用程序的远程调试 Java 部分

apache-flex - Coldfusion 9 引入了 IIS Flash Remoting 请求限制

apache-flex - SkinnablePopUpContainer 在视觉上被 Flex 中的 StageWebView 遮挡

java - IntelliJ Tomcat 延迟 war 部署

java - maven-shade-plugin:排除依赖项及其所有传递依赖项

用于 Android 开发的 Flash 与 Flex

apache-flex - 创建 native 安装程序桌面应用程序时如何将 Adob​​e Air 包含在包中