5

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>

私が得ているエラーは次のとおりです。

[エラー] プロジェクト com.adobe:gDash-main-maven:1.0-SNAPSHOT (C:\\pom.xml) に 1 つのエラーがあります [エラー] 解決できないビルド拡張機能: プラグイン com.adobe.flex.compiler:batik-all- flex:4.6.0.23201 またはその依存関係の 1 つを解決できませんでした: 次の成果物を解決できませんでした: com.adobe.flex.compiler:batik-all-flex:jar :4.6.0.23201、com.adobe.flex:compiler :pom:4.6.0.23201: アーティファクト com.adobe.flex.compiler:batik-all-flex:jar:4.6.0.23201 が中央に見つかりませんでした ( http://repo.maven.apache.org/maven2) -> [ヘルプ 2] org.apache.maven.plugin.PluginResolutionException: プラグイン com.adobe.flex.compile r:batik-all-flex:4.6.0.23201 またはその依存関係の 1 つが失敗しました次のアーティファクトを解決できませんでした: com.adobe.flex.compiler:batik-all- flex:jar:4.6.0.23201, com.adobe.flex:compiler:pom:4.6.0.23201: ar が見つかりませんでした中央の tifact com.adobe.flex.compiler:batik-all-flex:jar:4.6.0.23201 ( http://repo.maven.apache.org/maven2 )

4

2 に答える 2

1

私も同じ問題に直面していました。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 ファイルを生成します。

于 2013-08-28T11:43:04.533 に答える
0

リポジトリを参照すると、

http://repository.sonatype.org/content/groups/flexgroup/com/adobe/flex/framework/flex-framework/

バージョン 4.6.0.23201 には存在しませんが、バージョン 4.6.b.23201 には存在しません

于 2013-02-27T14:38:43.453 に答える