欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

关于maven插件,lifecycle-mapping org.codehaus.gmaven等插件在pom文件中报错解决方案

程序员文章站 2022-05-29 23:01:10
...

最近在研究tigase即时通讯组件,在官网下载下来的tigase-server源码中pom会报错,该报错信息我花了二天时间才解决,其实知道方法了 很快就能搞定的

只要在pom文件的<bulid>节点中加入如下代码

<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.codehaus.gmaven
										</groupId>
										<artifactId>
											gmaven-plugin
										</artifactId>
										<versionRange>
											[1.5,)
										</versionRange>
										<goals>
											<goal>execute </goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>

								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.commonjava.maven.plugins
										</groupId>
										<artifactId>
											directory-maven-plugin
										</artifactId>
										<versionRange>
											[0.1,)
										</versionRange>
										<goals>
											<goal>directory-of </goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

 添加后 重新maven update下就可以了,希望可以帮忙遇到同样问题的你。