我正在尝试jhipster
演示应用程序但是在eclipse
中导入项目时我在pom.xml文件中遇到错误
Plugin execution not covered by lifecycle configuration: com.github.trecloux:yeoman-maven-plugin:0.4:build
(execution: run-grunt, phase: generate-resources)
Plugin execution not covered by lifecycle configuration: org.jacoco:jacoco-maven-plugin:
0.7.4.201502262128:prepare-agent (execution: pre-unit-tests, phase: initialize)
我已尝试this链接,但它现在正在为我工作,然后我在下面添加到pom
<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.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<versionRange>[0.5,)
</versionRange>
<goals>
<goal>prepare-agent</goal>
</goals>
</pluginExecutionFilter>
<action>
<!-- m2e doesn't know what to do with jacoco,
let's ignore it or annoying error markers appear
see http://wiki.eclipse.org/M2E_plugin_execution_not_covered
-->
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.github.trecloux
</groupId>
<artifactId>
yeoman-maven-plugin
</artifactId>
<versionRange>
[0.4,)
</versionRange>
<goals>
<goal>build</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
之后我需要在命令行上运行grunt
,项目已成功启动。我不知道禁用插件的影响(除了自动启动grunt
服务器)
有人可以帮忙解决此错误吗?所以我不需要使用命令行。 我正在使用Eclipse(Mars),Lastest Maven,哟,咕噜,凉亭的最新版本。
答案 0 :(得分:5)
将pom.xml中的jacoco版本部分替换为以下版本,它将起作用。我也遇到了同样的问题并解决了这个问题,现在工作正常。
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>
因此,请删除版本标记之间的内容,并将其替换为.7.5.201505241946。它会工作。