您的位置:首页 > 运维架构

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

2017-12-22 00:00 183 查看
问题:maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e。

错误:Eclipse自带的m2e插件报出来的错误,原因是maven-dependency-plugin配置缺少pluginManagement的配置。

解决:pom.xml中添加pluginManagement的配置,代码如下

<build>
<finalName>CarOwner</finalName>

<pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-source</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

</pluginManagement>

</build>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  goals
相关文章推荐