o2geao 发表于 2017-12-24 06:53:33

org.apache.maven.plugins:maven-surefire

------------------------------------------------------------------------

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project taotao-common: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: A required> -----------------------------------------------------
realm =    plugin>org.apache.maven.plugins:maven-surefire-plugin:2.12.4
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls = file:/D:/softwareMaven/mavenFactory/org/apache/maven/plugins/maven-surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar
urls = file:/D:/softwareMaven/mavenFactory/org/apache/maven/surefire/surefire-booter/2.12.4/surefire-booter-2.12.4.jar
urls = file:/D:/softwareMaven/mavenFactory/org/apache/maven/surefire/surefire-api/2.12.4/surefire-api-2.12.4.jar
urls = file:/D:/softwareMaven/mavenFactory/org/apache/maven/surefire/maven-surefire-common/2.12.4/maven-surefire-common-2.12.4.jar
urls = file:/D:/softwareMaven/mavenFactory/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar
urls = file:/D:/softwareMaven/mavenFactory/org/apache/maven/shared/maven-common-artifact-filters/1.3/maven-common-artifact-filters-1.3.jar
urls = file:/D:/softwareMaven/mavenFactory/org/codehaus/plexus/plexus-utils/3.0.8/plexus-utils-3.0.8.jar
urls = file:/D:/softwareMaven/mavenFactory/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.jar
urls = file:/D:/softwareMaven/mavenFactory/org/apache/maven/plugin-tools/maven-plugin-annotations/3.1/maven-plugin-annotations-3.1.jar
Number of foreign imports: 1

import: Entry
-----------------------------------------------------: org.apache.commons.lang3.StringUtils
->

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
  解决:在总的xxx-parent的pom.xml中配置:
  

    <build>  <finalName>${project.artifactId}</finalName>
  <plugins>
  <!-- 资源文件拷贝插件 -->
  <plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-resources-plugin</artifactId>
  <version>2.7</version>
  <configuration>
  <encoding>UTF-8</encoding>
  </configuration>
  </plugin>
  <!-- java编译插件 -->
  <plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.2</version>
  <configuration>
  <source>1.7</source>
  <target>1.7</target>
  <encoding>UTF-8</encoding>
  </configuration>
  </plugin>
  
            <plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.7</version>
  </plugin>
  </plugins>
  <pluginManagement>
  <plugins>
  <!-- 配置Tomcat插件 -->
  <plugin>
  <groupId>org.apache.tomcat.maven</groupId>
  <artifactId>tomcat7-maven-plugin</artifactId>
  <version>2.2</version>
  </plugin>
  </plugins>
  </pluginManagement>
  </build>
  
页: [1]
查看完整版本: org.apache.maven.plugins:maven-surefire