m2e:m2e不支持复制依赖关系 [英] m2e: copy-dependencies is not supported by m2e
问题描述
我在我的 pom.xml
中收到这个错误,我不明白为了让eclipse运行该项目需要改变什么(以as - > maven build)
I get this error in my pom.xml
, and I can't understand what I need to change in order to get eclipse to run the project (run as -> maven build)
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.cc.adapter.mock.InsertAccountStarter</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Line below is the error -->
<execution>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-soap</artifactId>
<version>${cxf.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-sources</id>
<configuration>
<sourceRoot>src/main/generated</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>src/main/wsdl/CrmService.wsdl</wsdl>
<autoNameResolution>true</autoNameResolution>
<extendedSoapHeaders>true</extendedSoapHeaders>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
尝试从eclipse内部构建错误是
The error when trying to build it from within eclipse is
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]
我真的非常感谢任何帮助!
I would really appreciate any help!
推荐答案
从上面的错误信息,您似乎尝试了 Run as - >没有指定要运行哪个maven
。 目标
的Maven Build
From the error message above, it appears that you have tried the Run as -> Maven Build
without specifying which maven goal
to run.
您应该尝试一个特定的maven目标 - 运行为 - > Maven安装
或运行为 - > Maven测试
。
或者,您可以在 Maven Build配置
中提供目标。
You should try a specific maven goal - Run as -> Maven install
or Run as -> Maven test
.
Alternately, you can provide a goal in the Maven Build configuration
.
现在,至于警告, m2e
不支持副本依赖关系,这意味着m2e不支持此插件。 m2e目前不支持所有的maven功能。
Now, as for the warning, copy-dependencies is not supported by m2e
, it means that m2e does not support this plugin. Not all the maven functionality are currently supported by m2e.
这篇关于m2e:m2e不支持复制依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!