错误:生命周期配置maven错误未涵盖插件执行

时间:2013-04-05 19:32:39

标签: eclipse flex maven m2e flexmojos

我有一个我需要转换为maven项目的flex项目。我在Eclipse上使用m2e,在这篇文章的底部是我创建的POM.xml文件。

我的问题是我似乎无法在此POM上运行mvn clean install。在Eclipse中,有一个错误突出显示第一个“插件”行:

-Plugin execution not covered by lifecycle configuration:
 org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1:test-compile 
 (execution: default-test-compile, phase: test-compile)  

-Plugin execution not covered by lifecycle configuration:
org.sonatype.flexmojos:flexmojos-maven-plugin:3.7.1:compile-swf 
(execution: default-compile-swf, phase: compile)

除此之外,如果我运行mvn clean install,我会得到一个不同的错误:

Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:
3.7.1:compile-swf (default-compile-swf) on project flex: Failure to find
com.adobe.flex.framework:framework:rb.swc:en_US:3.2.0.3958 in
nexusserver/nexus/content/groups/public was cached in the local repository, 
resolution  will not be reattempted until the update interval of nexus has 
elapsed or updates are forced

我正在查看nexus服务器,我看到了:

-com\adobe\flex\framework\framework\3.2.0.3958

里面有一堆拉链和东西,文件:framework-3.2.0.3958.rb.swc

所以我不确定究竟是什么问题。我仍然是一个maven新手,我从来没有真正使用过flex,所以我觉得我现在只是有点不知所措。有没有人有任何想法如何解决至少一个问题?谢谢你的时间。

编辑:更糟糕的是,该文件位于我的本地存储库中,因此我不知道它为什么没有看到它。

-

的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated from the following command: mvn archetype:generate -DarchetypeRepository=http://repository.sonatype.org/content/groups/public 
-DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-application 
-DarchetypeVersion=3.7.1 -->
<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.company.ref</groupId>
<artifactId>flex</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>swf</packaging>

<name>flex</name>

<build>
    <plugins>
        <plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>3.7.1</version>
            <extensions>true</extensions>
            <configuration>
                <locales>
                    <locale>en_US</locale>
                </locales>
            </configuration>
        </plugin>
    </plugins>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <testSourceDirectory>src/test/flex</testSourceDirectory>
    <pluginManagement>
        <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings 
                only. It has no influence on the Maven build itself. -->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>aspectj-maven-plugin</artifactId>
                                    <versionRange>[1.0,)</versionRange>
                                    <goals>
                                        <goal>test-compile</goal>
                                        <goal>compile</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <execute />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

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

<profiles>
    <profile><!--https://docs.sonatype.org/pages/viewpage.action?pageId=2949459 -->
        <id>m2e</id>
        <activation>
            <property>
                <name>m2e.version</name>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.maven.ide.eclipse</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>0.9.9-SNAPSHOT</version>
                    <configuration>
                        <mappingId>customizable</mappingId>
                        <configurators>
                            <configurator
                                id='org.maven.ide.eclipse.configuration.flex.configurator' />
                        </configurators>
                        <mojoExecutions>
                            <mojoExecution>org.apache.maven.plugins:maven-resources-plugin::</mojoExecution>
                        </mojoExecutions>
                    </configuration>
                </plugin>
            </plugins>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>2.4</version>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>
    </profile>
</profiles>

这是我得到的完整错误:

[INFO]   Apache License - Version 2.0 (NO WARRANTY) - See COPYRIGHT file
[WARNING] Source file was not defined, flexmojos will guess one.
[WARNING] Not defined if locales should be merged or not
[WARNING] Unable to find license.jar on classpath. Check wiki for instructions about how to add it:
URL
Downloading: nexusURL/nexus/content/groups/public/com/adobe/flex/framework/framework/3.2.0.3958/framework-3.2.0.3958-en_US.rb.swc
[INFO] Unable to find resource 'com.adobe.flex.framework:framework:rb.swc:en_US:3.2.0.3958' in repository central (central)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.adobe.flex.framework -DartifactId=framework -Dversion=3.2.0.3958 -Dclassifier=en_US -Dpackaging=rb.swc -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.adobe.flex.framework -DartifactId=framework -Dversion=3.2.0.3958 -Dclassifier=en_US -Dpackaging=rb.swc -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]


com.adobe.flex.framework:framework:rb.swc:3.2.0.3958

from the specified remote repositories: central

更新3:这是我的新POM:

<?xml version="1.0" encoding="UTF-8"?>
<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.company.table</groupId>
<artifactId>flex</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>swf</packaging>

<name>flex</name>

<repositories>
    <repository>
        <id>flex-mojos-repository</id>
        <url>https://repository.sonatype.org/content/groups/flexgroup</url>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>flex-mojos-repository</id>
        <url>https://repository.sonatype.org/content/groups/flexgroup</url>
    </pluginRepository>
</pluginRepositories>

<build>
    <plugins>
        <plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>3.7.1</version>
            <extensions>true</extensions>               
        </plugin>
    </plugins>
    <sourceDirectory>src/main/flex</sourceDirectory>
    <testSourceDirectory>src/test/flex</testSourceDirectory>
</build>

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

0 个答案:

没有答案