M2e - 生命周期未涵盖的插件执行

And*_*nik 11 eclipse android maven m2e

操作系统:ubuntu 11.10

Eclipse:面向Web开发人员的Java EE IDE.版本:Indigo Service Release 2构建ID:20120216-1857 Java:jdk1.7.0_03 SDK adb:Android Debug Bridge版本1.0.29

尝试使用m2e android(2.8.4)在eclipse中构建javaocr.它会导致项目在pom.xml中生成错误:

Description Resource    Path    Location    Type
Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.8.4:generate-sources (execution: default-generate-sources, phase: generate-sources)    pom.xml /javaocr-sampler    line 20 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:maven-android-plugin:2.8.4:unpack (execution: default-unpack, phase: process-classes) pom.xml /javaocr-sampler    line 20 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:2.5:resources (execution: default-resources, phase: process-resources) pom.xml /javaocr-sampler    line 11 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:2.5:testResources (execution: default-testResources, phase: process-test-resources)    pom.xml /javaocr-sampler    line 11 Maven Project Build Lifecycle Mapping Problem
Run Code Online (Sandbox Code Playgroud)

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>
    <parent>
        <groupId>net.sourceforge.javaocr.demos</groupId>
        <artifactId>javaocr-demos-parent</artifactId>
        <version>1.102-SNAPSHOT</version>
    </parent>
    <groupId>net.sourceforge.javaocr.demos</groupId>
    <artifactId>javaocr-sampler</artifactId>
    <packaging>apk</packaging>
    <name>Android sampler</name>
    <description>
        Demo appliocation to gather samples for further training
        of matchers
    </description>
    <build>
        <sourceDirectory>src</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>maven-android-plugin</artifactId>
                <version>2.8.4</version>
                <configuration>
                    <sdk>
                        <platform>7</platform>
                    </sdk>
                    <emulator>
                        <avd>16</avd>
                    </emulator>
                    <deleteConflictingFiles>true</deleteConflictingFiles>
                    <undeployBeforeDeploy>true</undeployBeforeDeploy>
                </configuration>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>net.sourceforge.javaocr</groupId>
            <artifactId>javaocr-core</artifactId>
            <version>${pom.version}</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.javaocr.demos</groupId>
            <artifactId>javaocr-android-camera-utils</artifactId>
            <version>${pom.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.android</groupId>
            <artifactId>android</artifactId>
            <version>2.1_r1</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
Run Code Online (Sandbox Code Playgroud)

我对maven来说是全新的,但是我已经四处寻找解决方案了,但我空洞了.这是一个在IDEA(AFAIK)开发的项目,它应该在那里完美地工作,我只是不能让IDEA既不运行:' - /它javaocr svn链接.

Thi*_*ico 7

我有同样的问题.这就是我解决它的方式.在pom.xml文件中,进行更改

<artifactId>maven-android-plugin</artifactId>
<version>2.8.3</version>
Run Code Online (Sandbox Code Playgroud)

对于

<artifactId>android-maven-plugin</artifactId>
<version>3.4.1</version>
Run Code Online (Sandbox Code Playgroud)

这解决了它至少对我来说:)


Ric*_*ell 3

首先,您使用的是旧版本的 android-maven 插件。您应该升级到最新的 3.1.1:

http://code.google.com/p/maven-android-plugin/

其次,请参阅正确安装 m2e 的 m2e-android 插件说明的第 3 节:

http://rgladwell.github.com/m2e-android/

您可以通过打开 POM 并单击“生命周期配置未涵盖插件执行”错误来安装 m2e-android。这将为您提供发现新的 m2e 连接器的选项。

选择此选项,系统会自动提示您下载并安装 Android Connector。