使用mvn clean install 命令的时候提示了以下错误提示

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project samples-aspectj: There are test failures.

解决办法:

第一种:

pom.xml里加入以下配置:

<plugin>  
        <groupId>org.apache.maven.plugins</groupId>  
        <artifactId>maven-surefire-plugin</artifactId>  
        <version>2.4.2</version>  
        <configuration>  
          <skipTests>true</skipTests>  
        </configuration>  
</plugin>

第二种:

mvn clean package -Dmaven.test.skip=true