gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 02:58:06 25 4
gpt4 key购买 nike

我正在尝试使用 eclipse 构建 OpenHAB 开源项目。但在 pom.xml 中出现以下错误

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

生命周期配置未涵盖插件执行:org.apache.karaf.tooling:karaf-maven-plugin: 4.0.3:features-generate-descriptor(执行:default-features-generate-descriptor,阶段:编译)

这是 pom.xml 文件:

<?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文件:

<?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>

最佳答案

这只是你的 Eclipse 内部的一个问题。消息“生命周期配置未涵盖插件执行”只是意味着 eclipse 不知道 pom 中使用的“org.apache.karaf.tooling:karaf-maven-plugin”插件。

解决方案:在 Eclipse 中右键单击父项目,然后选择“Run As”==>“Run as maven build...”,在“goal”字段中输入“clean package”,然后点击“Run ”来构建项目(Build-Artifact 将出现在“target”目录中)。

关于java - Pom.xml OpenHAB 中的生命周期配置未涵盖插件执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36687378/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com