首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pom.xml OpenHAB中的生命周期配置未涵盖插件执行

Pom.xml OpenHAB中的生命周期配置未涵盖插件执行
EN

Stack Overflow用户
提问于 2016-04-18 15:05:19
回答 2查看 6.4K关注 0票数 1

我正在尝试使用eclipse构建OpenHAB开源项目。但是在pom.xml中遇到下面的错误

我不知道Maven构建系统,现在只是尝试编译和构建OpenHAB。

生命周期配置中未涵盖的插件执行: org.apache.karaf.tooling:karaf-maven- Plugin : 4.0.3:features generate-descriptor ( execution : default-features generate-descriptor,phase: compile)

这是pom.xml文件:

代码语言:javascript
复制
<?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/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.openhab</groupId>
        <artifactId>features</artifactId>
        <version>1.9.0-SNAPSHOT</version>
    </parent>

    <groupId>org.openhab.addons</groupId>
    <artifactId>openhab-addons</artifactId>
    <packaging>feature</packaging>

    <name>openHAB Feature Addons</name>
    <description>openHAB Addons</description>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>openhab-addons-external</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins> <!-- SHOWING ERROR HERE -->
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <startLevel>80</startLevel>
                    <aggregateFeatures>true</aggregateFeatures>
                    <!--  <resolver>(obr)</resolver> -->
                    <checkDependencyChange>true</checkDependencyChange>
                    <failOnDependencyChange>false</failOnDependencyChange>
                    <logDependencyChanges>true</logDependencyChanges>
                    <overwriteChangedDependencies>true</overwriteChangedDependencies>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

父pom.xml文件:

代码语言:javascript
复制
<?xml version="1.0" encoding="MACROMAN"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <parent>
    <groupId>org.openhab</groupId>
    <artifactId>openhab</artifactId>
    <version>1.9.0-SNAPSHOT</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.openhab</groupId>
  <artifactId>features</artifactId>

  <name>openHAB Features</name>

  <packaging>pom</packaging>

    <properties>
        <ohc.version>2.0.0.a4</ohc.version>
        <esh.version>0.8.0.b2</esh.version>
        <shk.version>1.2</shk.version>
        <karaf.version>4.0.3</karaf.version>
        <build.helper.maven.plugin.version>1.9.1</build.helper.maven.plugin.version>
    </properties>

  <modules>
    <module>openhab-addons</module>
    <module>openhab-addons-external</module>
    <module>openhab-addons-verify</module>
  </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.karaf.tooling</groupId>
                    <artifactId>karaf-maven-plugin</artifactId>
                    <version>${karaf.version}</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build.helper.maven.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <repositories>
        <repository>
            <id>jcenter</id>
            <name>JCenter Repository</name>
            <url>https://jcenter.bintray.com/</url>
        </repository>
        <repository>
            <id>shk-bintray</id>
            <name>Bintray Repository for shk</name>
            <url>https://dl.bintray.com/maggu2810/maven</url>
        </repository>
        <repository>
            <id>eclipse-snapshots</id>
            <name>Eclipse Snapshot Repository</name>
            <layout>default</layout>
            <url>https://repo.eclipse.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>eclipse-releases</id>
            <name>Eclipse Release Repository</name>
            <layout>default</layout>
            <url>https://repo.eclipse.org/content/repositories/releases/</url>
        </repository>
        <repository>
            <id>jfrog</id>
            <name>JFrog OSS Repository</name>
            <url>http://oss.jfrog.org/libs-snapshot/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>


</project>
EN

回答 2

Stack Overflow用户

发布于 2016-04-18 15:49:38

这只是你的月食中的一个问题。消息"Plugin execution not covered by lifecycle configuration“的意思是,eclipse不知道你的pom中使用的"org.apache.karaf.tooling:karaf-maven- plugin”插件。

解决方案:右击eclipse中的父项目,选择"Run As“==> "Run as maven build...",在"goal”字段中输入"clean package“并点击"Run”来构建项目( build -Artiface会出现在"target“目录中)。

票数 1
EN

Stack Overflow用户

发布于 2016-04-18 17:33:57

Default solution to define via pluginManagement类似于以下内容:

代码语言:javascript
复制
<pluginManagement>
  <plugins>
    <plugin>
     <groupId>org.eclipse.m2e</groupId>
     <artifactId>lifecycle-mapping</artifactId>
     <version>1.0.0</version>
     <configuration>
       <lifecycleMappingMetadata>
         <pluginExecutions>
           <pluginExecution>
             <pluginExecutionFilter>
               <groupId>some-group-id</groupId>
               <artifactId>some-artifact-id</artifactId>
               <versionRange>[1.0.0,)</versionRange>
               <goals>
                 <goal>some-goal</goal>
               </goals>
             </pluginExecutionFilter>
             <action>
               <ignore/>
             </action>
           </pluginExecution>
         </pluginExecutions>
       </lifecycleMappingMetadata>
     </configuration>
    </plugin>
  </plugins>
</pluginManagement>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36687378

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档