Maven之Unable to load the mojo 'resources' (or one of its required components)

原创 2017年09月11日 10:04:26

环境情况

Eclipse, Java项目

问题表现

Description Resource Path Location Type
Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: Unable to load the mojo ‘resources’ (or one of its required components) from the plugin ‘org.apache.maven.plugins:maven-resources-plugin:2.6’ (org.apache.maven.plugins:maven-resources-plugin:2.6:resources:default-resources:process-resources)
org.apache.maven.plugin.PluginExecutionException: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: Unable to load the mojo ‘resources’ (or one of its required components) from the plugin ‘org.apache.maven.plugins:maven-resources-plugin:2.6’
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:153)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
at org.eclipse.m2e.core.internal.embedder.MavenImpl11.call(MavenImpl.java:1362)atorg.eclipse.m2e.core.internal.embedder.MavenImpl11.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
at org.eclipse.m2e.core.internal.builder.MavenBuilder1.method(MavenBuilder.java:172)atorg.eclipse.m2e.core.internal.builder.MavenBuilder1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilderBuildMethod11.call(MavenBuilder.java:115)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)atorg.eclipse.m2e.core.internal.builder.MavenBuilderBuildMethod1.call(MavenBuilder.java:105)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)atorg.eclipse.m2e.core.internal.builder.MavenBuilderBuildMethod.execute(MavenBuilder.java:86)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
at org.eclipse.core.internal.events.BuildManager2.run(BuildManager.java:735)atorg.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)atorg.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)atorg.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)atorg.eclipse.core.internal.events.BuildManager1.run(BuildManager.java:301)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.apache.maven.plugin.PluginContainerException: Unable to load the mojo ‘resources’ (or one of its required components) from the plugin ‘org.apache.maven.plugins:maven-resources-plugin:2.6’
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:551)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
… 31 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.apache.maven.plugin.Mojo
roleHint: org.apache.maven.plugins:maven-resources-plugin:2.6:resources
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:517)
… 32 more
Caused by: java.util.NoSuchElementException
at org.eclipse.sisu.plexus.RealmFilteredBeansFilteredItr.next(RealmFilteredBeans.java:118)atorg.eclipse.sisu.plexus.RealmFilteredBeansFilteredItr.next(RealmFilteredBeans.java:1)
at org.eclipse.sisu.plexus.DefaultPlexusBeansItr.next(DefaultPlexusBeans.java:76)atorg.eclipse.sisu.plexus.DefaultPlexusBeansItr.next(DefaultPlexusBeans.java:1)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
… 34 more
pom.xml /aifasion-web line 4 Maven Build Problem
Description Resource Path Location Type
Execution default-testResources of goal
org.apache.maven.plugins:maven-resources-plugin:2.6:testResources failed: Unable to load the mojo ‘testResources’ (or one of its required components) from the plugin ‘org.apache.maven.plugins:maven-resources-plugin:2.6’ (org.apache.maven.plugins:maven-resources-plugin:2.6:testResources:default-testResources:process-test-resources)
org.apache.maven.plugin.PluginExecutionException: Execution default-testResources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:testResources failed: Unable to load the mojo ‘testResources’ (or one of its required components) from the plugin ‘org.apache.maven.plugins:maven-resources-plugin:2.6’
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:153)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
at org.eclipse.m2e.core.internal.embedder.MavenImpl11.call(MavenImpl.java:1362)atorg.eclipse.m2e.core.internal.embedder.MavenImpl11.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
at org.eclipse.m2e.core.internal.builder.MavenBuilder1.method(MavenBuilder.java:172)atorg.eclipse.m2e.core.internal.builder.MavenBuilder1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilderBuildMethod11.call(MavenBuilder.java:115)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)atorg.eclipse.m2e.core.internal.builder.MavenBuilderBuildMethod1.call(MavenBuilder.java:105)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)atorg.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)atorg.eclipse.m2e.core.internal.builder.MavenBuilderBuildMethod.execute(MavenBuilder.java:86)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
at org.eclipse.core.internal.events.BuildManager2.run(BuildManager.java:735)atorg.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)atorg.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)atorg.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)atorg.eclipse.core.internal.events.BuildManager1.run(BuildManager.java:301)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.apache.maven.plugin.PluginContainerException: Unable to load the mojo ‘testResources’ (or one of its required components) from the plugin ‘org.apache.maven.plugins:maven-resources-plugin:2.6’
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:551)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
… 31 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.apache.maven.plugin.Mojo
roleHint: org.apache.maven.plugins:maven-resources-plugin:2.6:testResources
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:517)
… 32 more
Caused by: java.util.NoSuchElementException
at org.eclipse.sisu.plexus.RealmFilteredBeansFilteredItr.next(RealmFilteredBeans.java:118)atorg.eclipse.sisu.plexus.RealmFilteredBeansFilteredItr.next(RealmFilteredBeans.java:1)
at org.eclipse.sisu.plexus.DefaultPlexusBeansItr.next(DefaultPlexusBeans.java:76)atorg.eclipse.sisu.plexus.DefaultPlexusBeansItr.next(DefaultPlexusBeans.java:1)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
… 34 more
pom.xml /aifasion-web line 4 Maven Build Problem

解决的办法

在Eclipse中,右击菜单, Maven–>Update Projects. 则问题会消失。

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

解决Maven报Plugin execution not covered by lifecycle configuration

Maven问题一直头疼着每一个开发人员

eclipse加载maven工程提示pom.xml无法解析org.apache.maven.plugins:maven-resources-plugin:2.4.3解决方案

在别的机子上创建一个maven工程,复制到本机上导入,出现pom.xml文件错误,提示错误如下 Multiple annotations found at this line: - Execut...
  • imlmy
  • imlmy
  • 2012-12-07 10:34
  • 231956

Maven创建所遇到的问题记录

Maven创建所遇到的问题记录: 第一次搭建ssm框架,eclipse搭建maven时候,遇到了各种奇葩奇怪的问题,各种百度Google,终无解。 偶然看见的maven官网maven对jdk版本的...

Oracle常用脚本备忘

1、创建一个表T2,使之具有T1表的结构        CREATE TABLE T2 AS SELECT * FROM T1 WHERE 12、创建一个表T2,使之具有T1表的结构和数据  ...

Maven之错误

maven工程提示pom.xml无法解析org.apache.maven.plugins:maven-resources-plugin:2.6 Description Resource ...

Exception about "Could not load file or assembly Namespace.Components' or one of its dependencies."

由于asp.net的权限问题,所以如果在site中使用了Assembly.Load()方法,那么很容易报这个错误。我的整个解决方法如下:1.执行 c:/winnt/microsoft.net/fram...

当用到反射的程序部署时出现System.Data - System.Reflection.ReflectionTypeLoadException: Unable to load one or more

出现这个错误是因为某些dll无法用LoadFrom加载造成的,一般情况下是环境中缺少这个dll。另外一种情况,当你是遍历bin来反射dll时,如果不影响业务,可以把那些加载不上的dll忽略掉(前提是忽...

We are unable to complete the review of your app since one or more of your In App Purchases have not

当我苦苦等待的项目在8天后,收到了一个苹果的的“ Rejected”!太纠结了......太苦逼了...... 首先说明,这个项目是有内置购买的。 苹果的反馈信息是: Missing IAP...

Unable to read the project file 'client.csproj'. Could not load file or assembly 'Microsoft.Build.En

错误详细信息:Unable to read the project file 'client.csproj'. Could not load file or assembly 'Microsoft.B...

MetaException(message:file:/user/hive/warehouse/xxxx is not a directory or unable to create one)

一 前言 在eclipse中编译调试hive 时出现以下问题 启动clidriver程序在 console执行命令如下 hive> create table xxxx(id int)...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)