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