no plugin descriptor found at meta-inf/maven 没有 meta inf/plugin.xml怎么解决

java - Failed to parse plugin descriptor for maven:maven-nsis-plugin:2.1 - Stack Overflow
to customize your list.
Join the Stack Overflow Community
Stack Overflow is a community of 6.2 million programmers, just like you, helping each other.
J it only takes a minute:
I am exploring the usage of nsis (newbie) in maven.
I have created the dependency in my pom.xml. It is downloaded successfully, but when I clean & compile my project, I get the following error message:
Failed to parse plugin descriptor for maven:maven-nsis-plugin:2.1
(C:\... \.m2\repository\maven\maven-nsis-plugin\2.1\maven-nsis-plugin-2.1.jar):
No plugin descriptor found at META-INF/maven/plugin.xml -& [Help 1]
I have tried to delete \.m2\repository\maven\, but it did not help. Anyone knows what is happening?
20.6k48164300
Try the codehaus plugin. You can find an operational example using it here:
From what I can see, you can using Maven 1.x version of the plugin with Maven 2/3.
is a Maven 1.x plugin
is the Maven 2/3 plugin
36.4k56997
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled85388人阅读
& & eclipse 4.3.0
& & maven 3.0.4
& & m2e 1.4.0
& & 以前的老项目,在我的环境(我的环境较新)下,别人老环境不报错。
一个错误示例,子项目引用了父项目,子项目parent标签处报错如下:
Multiple annotations found at this line:
- maven-enforcer-plugin (goal &enforce&) is ignored by m2e.
- Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.3.1:compile (execution:&
&default, phase: compile)
官网给出解释及解决办法:http://wiki.eclipse.org/M2E_plugin_execution_not_covered
这里有人说下面这样也可以解决, 即 &plugins& 标签外再套一个 &pluginManagement& 标签,我试验是成功的:
/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin
& & &pluginManagement&
& & & & &plugins&
& & & & & & &plugin& ... &/plugin&
& & & & & & &plugin& ... &/plugin&
& & & & & & & & & ....
& & & & &/plugins&
& & &/pluginManagement&
但是有时候父项目pom不能被修改,可用官网最后给出的解决办法:
Window-Perferences-Maven-Lifecycle Mapping
保存如下内容:
&?xml version=&1.0&&encoding=&UTF-8&?&
&lifecycleMappingMetadata&
&&& &pluginExecutions&
&&& &&& &pluginExecution&
&&& &&& &&& &pluginExecutionFilter&
&&& &&& &&& &&& &groupId&org.codehaus.mojo&/groupId&
&&& &&& &&& &&& &artifactId&aspectj-maven-plugin&/artifactId&
&&& &&& &&& &&& &goals&
&&& &&& &&& &&& &&& &goal&compile&/goal&
&&& &&& &&& &&& &/goals&
&&& &&& &&& &&& &versionRange&[1.3,)&/versionRange&
&&& &&& &&& &/pluginExecutionFilter&
&&& &&& &&& &action&
&&& &&& &&& &&& &ignore /&
&&& &&& &&& &/action&
&&& &&& &/pluginExecution&
&&& &/pluginExecutions&
&/lifecycleMappingMetadata&
记得点击 ”Reload workspace lifecycle mappings metadata“按钮
问题解决。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1053267次
积分:10090
积分:10090
排名:第1186名
原创:184篇
转载:68篇
评论:155条
(1)(4)(5)(3)(1)(10)(1)(3)(2)(3)(3)(1)(2)(1)(3)(5)(3)(7)(1)(1)(1)(9)(4)(7)(9)(1)(1)(1)(5)(5)(10)(3)(6)(4)(3)(5)(4)(8)(5)(3)(3)(8)(10)(2)(3)(1)(3)(6)(5)(3)(13)(11)(5)(9)(8)(6)(4)<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
您的访问请求被拒绝 403 Forbidden - ITeye技术社区
您的访问请求被拒绝
亲爱的会员,您的IP地址所在网段被ITeye拒绝服务,这可能是以下两种情况导致:
一、您所在的网段内有网络爬虫大量抓取ITeye网页,为保证其他人流畅的访问ITeye,该网段被ITeye拒绝
二、您通过某个代理服务器访问ITeye网站,该代理服务器被网络爬虫利用,大量抓取ITeye网页
请您点击按钮解除封锁&本地编译 hadoop 遇到错误 求大神指导_hadoop吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0可签7级以上的吧50个
本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:9,345贴子:
本地编译 hadoop 遇到错误 求大神指导
编译时候 报错 : Failed to parse plugin descriptor for org.apache.hadoop:hadoop-maven-plugins:2.2.0 (/Users/Howie/Downloads/release-2.2.0/hadoop-maven-plugins/target/classes): No plugin descriptor found at META-INF/maven/plugin.xml -& [Help 1]
上海达内JAVA大数据培训一般需要4-8周,就可完全掌握,名企就业.JAVA大数培训的费用一般根据培训的课时决定,可申请0元试学,点击咨询..
要先 install
hadoop-maven-plugins
我也遇到同样的错误,加Q讨论
把.m2下生成的文件删掉,然后再mvn install就行了
贴吧热议榜
使用签名档&&
保存至快速回贴13873人阅读
根据POM 4.0.0 XSD,build元素概念性的划分为两个部分:BaseBuild(包含poject build和profile build的公共部分,见下)和poject build包含的一些高级特性。
&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&&
&!-- &Project Build& contains more elements than just the BaseBuild set --&
&build&...&/build&
&profiles&
&!-- &Profile Build& contains a subset of &Project Build&s elements --&
&build&...&/build&
&/profile&
&/profiles&
&/project&
BaseBuild元素集合
basic elements
&defaultGoal&install&/defaultGoal&
&directory&${basedir}/target&/directory&
&finalName&${artifactId}-${version}&/finalName&
&filter&filters/filter1.properties&/filter&
&/filters&
1、defaultGoal:执行build任务时,如果没有指定目标,将使用的默认&#20540;,如:在命令行中执行mvn,则相当于执行mvn install;
2、directory:build目标文件的存放目录,默认在${basedir}/target目录;
3、finalName:build目标文件的文件名,默认情况下为${artifactId}-${version};
4、filter:定义*.properties文件,包含一个properties列表,该列表会应用的支持filter的resources中。也就是说,定义在filter的文件中的&name=value&&#20540;对会在build时代替${name}&#20540;应用到resources中。Maven的默认filter文件夹是${basedir}/src/main/filters/。
build的另一个特征是指定你的项目中resources的位置。resources(通常)不是代码,他们不被编译,但是被绑定在你的项目或者用于其它什么原因,例如代码生成。
&resources&
&resource&
&targetPath&META-INF/plexus&/targetPath&
&filtering&false&/filtering&
&directory&${basedir}/src/main/plexus&/directory&
&includes&
&include&configuration.xml&/include&
&/includes&
&excludes&
&exclude&**/*.properties&/exclude&
&/excludes&
&/resource&
&/resources&
&testResources&
&/testResources&
1、resources:一个resource元素的列表,每一个都描述与项目关联的文件是什么和在哪里;
2、targetPath:指定build后的resource存放的文件夹。该路径默认是basedir。通常被打包在JAR中的resources的目标路径为META-INF;
3、filtering:true/false,表示为这个resource,filter是否激活。
4、directory:定义resource所在的文件夹,默认为${basedir}/src/main/resources;
5、includes:指定作为resource的文件的匹配模式,用*作为通配符;
6、excludes:指定哪些文件被忽略,如果一个文件同时符合includes和excludes,则excludes生效;
7、testResources:定义和resource类&#20284;,但只在test时使用,默认的test resource文件夹路径是${basedir}/src/test/resources,test resource不被部署。
&groupId&org.apache.maven.plugins&/groupId&
&artifactId&maven-jar-plugin&/artifactId&
&version&2.0&/version&
&extensions&false&/extensions&
&inherited&true&/inherited&
&configuration&
&classifier&test&/classifier&
&/configuration&
&dependencies&...&/dependencies&
&executions&...&/executions&
&/plugins&
除了groupId:artifactId:version标准坐标,plugin还需要如下属性:
1、extensions:true/false,是否加载plugin的extensions,默认为false;
2、inherited:true/false,这个plugin是否应用到该POM的孩子POM,默认true;
3、configuration:配置该plugin期望得到的properies,如上面的例子,我们为maven-jar-plugin的Mojo设置了classifier属性;
如果你的POM有一个parent,它可以从parent的build/plugins或者pluginManagement集成plugin配置。
为了阐述继承后的关系,考虑如果parent POM中存在如下plugin:
&groupId&my.group&/groupId&
&artifactId&my-plugin&/artifactId&
&configuration&
&item&parent-1&/item&
&item&parent-2&/item&
&properties&
&parentKey&parent&/parentKey&
&/properties&
&/configuration&
然后在继承的孩子POM中做如下配置:
&groupId&my.group&/groupId&
&artifactId&my-plugin&/artifactId&
&configuration&
&item&child-1&/item&
&properties&
&childKey&child&/childKey&
&/properties&
&/configuration&
这样孩子POM和parent POM中都存在groupId为my.group的plugin,Maven默认的行为将是根据属性名称将两个plugin的configuration的内容进行合并。如果孩子POM中有一个属性,则该属性是有效的,如果孩子POM中没有一个属性,但parent POM中存在,则parent中的属性是有效的。
根据这些规则,上面的例子在Maven中将得到:
&groupId&my.group&/groupId&
&artifactId&my-plugin&/artifactId&
&configuration&
&item&child-1&/item&
&properties&
&childKey&child&/childKey&
&parentKey&parent&/parentKey&
&/properties&
&/configuration&
通过在configuration元素中增加combine.children和combine.self属性,孩子POM可以控制Maven怎么合并plugin的configuration。
假定这儿是孩子POM的configuration:
&configuration&
&items combine.children=&append&&
&!-- combine.children=&merge& is the default --&
&item&child-1&/item&
&properties combine.self=&override&&
&!-- combine.self=&merge& is the default --&
&childKey&child&/childKey&
&/properties&
&/configuration&
则,现在合并后的效果如下:
&configuration&
&items combine.children=&append&&
&item&parent-1&/item&
&item&parent-2&/item&
&item&child-1&/item&
&properties combine.self=&override&&
&childKey&child&/childKey&
&/properties&
&/configuration&
combine.children=&append&表示父POM和子POM的属性合并起来;
combine.self=&override&表示子POM的属性完全覆盖父POM的。
4、dependencies:同base build中的dependencies有同样的结构和功能,但这里是作为plugin的依赖,而不是项目的依赖。
5、executions:plugin可以有多个目标,每一个目标都可以有一个分开的配置,甚至可以绑定一个plugin的目标到一个不同的阶段。executions配置一个plugin的目标的execution。
假定一项绑定antrun:run目标到verify阶段,我们希望任务响应build文件夹,同时避免传递配置到他的孩子POM。你将得到一个execution:
&artifactId&maven-antrun-plugin&/artifactId&
&version&1.1&/version&
&executions&
&execution&
&id&echodir&/id&
&goal&run&/goal&
&phase&verify&/phase&
&inherited&false&/inherited&
&configuration&
&echo&Build Dir: ${project.build.directory}&/echo&
&/configuration&
&/execution&
&/executions&
&/plugins&
id:标识,用于和其他execution区分。当这个阶段执行时,它将以这个形式展示:[plugin:goal execution: id]。在这里为: [antrun:run execution: echodir];
goals:一个plugin的execution的目标列表;
phase:目标执行的阶段,具体&#20540;看Maven的生命周期列表;
inherited:是否继承;
configuration:在指定的目标下的配置。
Plugin Management
pluginManagement的元素的配置和plugins的配置是一样的,只是这里的配置只是用于集成,在孩子POM中指定使用。例如,在父POM中做如下配置:
&pluginManagement&
&groupId&org.apache.maven.plugins&/groupId&
&artifactId&maven-jar-plugin&/artifactId&
&version&2.2&/version&
&executions&
&execution&
&id&pre-process-classes&/id&
&phase&compile&/phase&
&goal&jar&/goal&
&configuration&
&classifier&pre-process&/classifier&
&/configuration&
&/execution&
&/executions&
&/plugins&
&/pluginManagement&
则在孩子POM中,我们只需要配置:
&groupId&org.apache.maven.plugins&/groupId&
&artifactId&maven-jar-plugin&/artifactId&
&/plugins&
这样就可以大大的简化孩子POM中的配置。
Reporting包含的属性对应到site阶段(见Maven生命周期)。特定的Maven插件能产生定义和配置在reporting元素下的报告,例如:产生Javadoc报告。
&reporting&
&outputDirectory&${basedir}/target/site&/outputDirectory&
&artifactId&maven-project-info-reports-plugin&/artifactId&
&version&2.0.1&/version&
&reportSets&
&reportSet&&/reportSet&
&/reportSets&
&/plugins&
&/reporting&
对于reportSets:
&reportSets&
&reportSet&
&id&sunlink&/id&
&report&javadoc&/report&
&/reports&
&inherited&true&/inherited&
&configuration&
&link&/j2se/1.5.0/docs/api/&/link&
&/configuration&
&/reportSet&
&/reportSets&
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:210125次
积分:3426
积分:3426
排名:第7211名
原创:122篇
评论:82条
(1)(1)(5)(7)(1)(4)(4)(4)(4)(1)(1)(2)(5)(6)(7)(5)(1)(5)(5)(1)(3)(9)(8)(8)(4)(7)(6)(4)(1)(10)(1)

我要回帖

更多关于 maven descriptorref 的文章

 

随机推荐