在maven 3.2.5中的flexmojo支持

时间:2015-01-13 18:55:19

标签: java spring-mvc flex maven-plugin

我正在使用maven 3.0.5,我正在尝试将其升级到maven 3.2.5。一切都很好,除了 的Flexmojos。

当我使用maven 3.0.5构建时 - 应用程序构建正常,而3.2.5 verison给出了以下错误:

[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC2:copy-flex-resources 
项目ngi-web上的

(默认):目标的执行默认值 org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC2:copy-flex-resources failed: 执行时遇到API不兼容问题 org.sonatype.flexmojos:的Flexmojos - Maven的插件:4.0-RC2:复制柔性资源: java.lang.NoSuchMethodError:org.apache.maven.execution.MavenSession.getRepositorySession()Lorg / sonatype / aether / RepositorySystemSession;

要解决此问题,我将flexmojo版本更新为6.0.0但仍然出现以下错误

[ERROR] Plugin net.flexmojos.oss:flexmojos-maven-plugin:6.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for net.flexmojos.oss:flexmojos-maven-plugin:jar:6.0.0: Could not find artifact com.adobe.flex:framework:pom:4.6.0.23201 in all-repos (http://repo.cdiapps.com/repo) -> [Help 1]

[ERROR] [错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。 [错误]使用-X开关重新运行Maven以启用完整的调试日志记录。

flexmojo 4.0-RC2只适用于maven 3.0.5吗?有人可以帮我吗?

这是pom.xml文件中的flexmojo配置:

  <flexVersion>4.5.1.21328</flexVersion>
    <flexUnitVersion>4.0-rc-1</flexUnitVersion>
    <flexMojosVersion>4.0-RC2</flexMojosVersion>
   <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>

        <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.5</version>
            <configuration>
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <dependencies>
                <dependency>
                    <groupId>com.adobe.flex</groupId>
                    <artifactId>compiler</artifactId>
                    <version>${flexVersion}</version>
                    <type>pom</type>
                </dependency>
                <dependency>
                    <groupId>com.adobe.flex.compiler</groupId>
                    <artifactId>asdoc</artifactId>
                    <version>${flexVersion}</version>
                    <classifier>template</classifier>
                    <type>zip</type>
                </dependency>
            </dependencies>
            <version>${flexMojosVersion}</version>
            <executions>
                <execution>
                    <goals>
                        <goal>copy-flex-resources</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <webappDirectory>${basedir}/src/main/webapp/static</webappDirectory>
                <storepass/>
            </configuration>
        </plugin>

1 个答案:

答案 0 :(得分:1)

我今天得到了与Maven 3.2.3和flexmojos 7.0.1相同的错误。

我在这里找到了一个解决方法:http://mantis.jspresso.org/view.php?id=1186 即通过maven-dependency-plugin替换flexmojos-maven-plugin:copy-flex-resources':copy-dependencies。