码上敲享录 > IntelliJ IDEA常见问题分享 > 成功解决Either artifact or artifactItems is required

成功解决Either artifact or artifactItems is required

上一章章节目录下一章 2018-07-27已有5610人阅读 评论(0)

install执行maven项目报错:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack (default) on project common-framework: Either artifact or artifactItems is required  -> [Help 1]

解决方法:

错误的:

<!-- 导入框架库 -->
<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-dependency-plugin</artifactId>
 <version>2.8</version>
 <executions>
   <execution>
     <phase>compile</phase>
     <goals>
       <goal>unpack</goal>
     </goals>
   </execution>
 </executions>
</plugin>


正确的:要使用artifactItem授权

<!-- 导入框架库 -->
<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-dependency-plugin</artifactId>
 <version>2.8</version>
 <executions>
   <execution>
     <phase>compile</phase>
     <goals>
       <goal>unpack</goal>
     </goals>
   </execution>
 </executions>
 <configuration>
   <artifactItems>

<!--授权系统包 -->
<artifactItem>
       <groupId>com.entity</groupId>
       <artifactId>common</artifactId>
       <version>0.0.1-SNAPSHOT</version>
       <classifier>core</classifier>
       <type>jar</type>
       <overWrite>true</overWrite>
       <outputDirectory>target/classes</outputDirectory>
       <includes>**/*</includes>
     </artifactItem>
</artifactItems>
 </configuration>
</plugin>


本文地址:http://www.yayihouse.com/yayishuwu/chapter/1375



0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交