`

maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported

阅读更多
配置maven-dependency-plugin插件提示错误信:

Description Resource Path Location Type
maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e. pom.xml /demo line 159 Maven Project Build Lifecycle Mapping Problem

maven-dependency-plugin配置如下:
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-jars</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/lib</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>

解决方案:
在pom.xml中加入如下配置即可
		<pluginManagement>
			<plugins>
				<!-- Ignore/Execute plugin execution -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-dependency-plugin</artifactId>
										<versionRange>[1.0.0,)</versionRange>
										<goals>
											<goal>copy-dependencies</goal>
											<goal>unpack</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>


解决maven-dependency-plugin (goals “copy-dependencies”, “unpack”) is not supported
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics