Artifact has not been packaged yet. When used on reactor artifact.....see MDEP-187

m2.报错

    • 报错
    • 问题解决

报错

Artifact has not been packaged yet. When used on reactor artifact, copy should be executed after packaging: see MDEP-187 is thrown

问题解决

这个是eclipse的插件m2e的问题,并不是真正的错误。
解决步骤: Eclipse Window -> Preferences -> Maven -> Lifecycle Mappings点击Open workspace lifecycle mappings metadata,然后会打开一个文件,将下面内容复制进去,然后保存。

<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
  <pluginExecutions>
    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <versionRange>2.10</versionRange>
        <goals>
          <goal>copy-dependencies</goal>
        </goals>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>
  </pluginExecutions>
</lifecycleMappingMetadata>

保存完之后,点击Reload workspace lifecycle mappings metadata,就可以重新构建项目了(Alt+F5)或者clean项目让项目更新即可。

你可能感兴趣的:(Exception)