当我运行mvn安装程序时,我的karaf功能项目出错。这是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>com.dmasoft.karaf.example</groupId>
<artifactId>assemblies-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>com.dmasoft.karaf.example.feature</groupId>
<artifactId>dmasoft-feature</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>feature</packaging>
<name>${project.groupId}/${project.artifactId}:${project.packaging}:${project.version}</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
当我运行mvn全新安装时,出现此错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install (default-install) on project dmasoft-feature: NoFileAssignedException: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'. -> [Help 1]
答案 0 :(得分:6)
maven-install-plugin:3.0.0-M1已于2018年10月10日发布 从那以后,我在包装设置为的flexmojos项目中遇到了同样的错误。
解决方案是将maven-install-plugin的版本显式设置为先前的版本(2.5.2),以便它不会自动解析该版本。 注意:我也必须对maven-deploy-plugin执行此操作。可能还有其他人。
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</build>
答案 1 :(得分:0)
现在,您可以将mule.tools.version更改为1.7 1.7,而不用设置maven插件的版本。