Hi All, I just try to run the Hadoop test framework with the command " mvn test " in the top level directory of this project, but get "BUILD FAILURE". >From the tail of this log segment which listed below, it said can't find org/apache/maven/surefire/report/ReporterFactory class when run test of project "Apache Hadoop Annotations". But the class and file is in the directory absolutely. Then I just run "mvn test" in the subdirectory such as "hadoop-common-project/hadoop-common", and it work well without error. I tried another subdirectory that is "hadoop-common-project/hadoop-annotations", and it produced failure as I expected. I confused that why it can't find a certain class when I run test in the hadoop-annotations project.
So anyone could help me to find the cause of failure. The environment is CentOS Linux with JDK1.7, maven 3.0.4. Thanks Yanbo [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.apache.hadoop:hadoop-mapreduce-examples:jar:3.0.0-SNAPSHOT [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.hadoop:hadoop-mapreduce-client-hs:jar -> duplicate declaration of version (?) @ line 93, column 18 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Apache Hadoop Main [INFO] Apache Hadoop Project POM [INFO] Apache Hadoop Annotations [INFO] Apache Hadoop Project Dist POM [INFO] Apache Hadoop Assemblies [INFO] Apache Hadoop Auth [INFO] Apache Hadoop Auth Examples [INFO] Apache Hadoop Common [INFO] Apache Hadoop Common Project [INFO] Apache Hadoop HDFS [INFO] Apache Hadoop HttpFS [INFO] Apache Hadoop HDFS BookKeeper Journal [INFO] Apache Hadoop HDFS Project [INFO] hadoop-yarn [INFO] hadoop-yarn-api [INFO] hadoop-yarn-common [INFO] hadoop-yarn-server [INFO] hadoop-yarn-server-common [INFO] hadoop-yarn-server-nodemanager [INFO] hadoop-yarn-server-web-proxy [INFO] hadoop-yarn-server-resourcemanager [INFO] hadoop-yarn-server-tests [INFO] hadoop-mapreduce-client [INFO] hadoop-mapreduce-client-core [INFO] hadoop-yarn-applications [INFO] hadoop-yarn-applications-distributedshell [INFO] hadoop-yarn-site [INFO] hadoop-mapreduce-client-common [INFO] hadoop-mapreduce-client-shuffle [INFO] hadoop-mapreduce-client-app [INFO] hadoop-mapreduce-client-hs [INFO] hadoop-mapreduce-client-jobclient [INFO] Apache Hadoop MapReduce Examples [INFO] hadoop-mapreduce [INFO] Apache Hadoop MapReduce Streaming [INFO] Apache Hadoop Distributed Copy [INFO] Apache Hadoop Archives [INFO] Apache Hadoop Rumen [INFO] Apache Hadoop Gridmix [INFO] Apache Hadoop Data Join [INFO] Apache Hadoop Extras [INFO] Apache Hadoop Pipes [INFO] Apache Hadoop Tools Dist [INFO] Apache Hadoop Tools [INFO] Apache Hadoop Distribution [INFO] Apache Hadoop Client [INFO] Apache Hadoop Mini-Cluster [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Apache Hadoop Main 3.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-enforcer-plugin:1.0:enforce (default) @ hadoop-main --- [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Apache Hadoop Project POM 3.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-antrun-plugin:1.6:run (create-testdirs) @ hadoop-project --- [INFO] Executing tasks main: [mkdir] Created dir: /root/hadoop/trunk/hadoop-project/target/test-dir [INFO] Executed tasks [INFO] [INFO] --- maven-dependency-plugin:2.1:build-classpath (build-classpath) @ hadoop-project --- [INFO] Wrote classpath file '/root/hadoop/trunk/hadoop-project/target/classes/mrapp-generated-classpath'. [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Apache Hadoop Annotations 3.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-antrun-plugin:1.6:run (create-testdirs) @ hadoop-annotations --- [INFO] Executing tasks main: [mkdir] Created dir: /root/hadoop/trunk/hadoop-common-project/hadoop-annotations/target/test-dir [INFO] Executed tasks [INFO] [INFO] --- maven-dependency-plugin:2.1:build-classpath (build-classpath) @ hadoop-annotations --- [INFO] Wrote classpath file '/root/hadoop/trunk/hadoop-common-project/hadoop-annotations/target/classes/mrapp-generated-classpath'. [INFO] [INFO] --- maven-resources-plugin:2.2:resources (default-resources) @ hadoop-annotations --- [INFO] Using default encoding to copy filtered resources. [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ hadoop-annotations --- [INFO] Compiling 8 source files to /root/hadoop/trunk/hadoop-common-project/hadoop-annotations/target/classes [INFO] [INFO] --- maven-resources-plugin:2.2:testResources (default-testResources) @ hadoop-annotations --- [INFO] Using default encoding to copy filtered resources. [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ hadoop-annotations --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12:test (default-test) @ hadoop-annotations --- [INFO] No tests to run. [INFO] Surefire report directory: /root/hadoop/trunk/hadoop-common-project/hadoop-annotations/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Apache Hadoop Main ................................ SUCCESS [0.634s] [INFO] Apache Hadoop Project POM ......................... SUCCESS [1.547s] [INFO] Apache Hadoop Annotations ......................... FAILURE [2.294s] [INFO] Apache Hadoop Project Dist POM .................... SKIPPED [INFO] Apache Hadoop Assemblies .......................... SKIPPED [INFO] Apache Hadoop Auth ................................ SKIPPED [INFO] Apache Hadoop Auth Examples ....................... SKIPPED [INFO] Apache Hadoop Common .............................. SKIPPED [INFO] Apache Hadoop Common Project ...................... SKIPPED [INFO] Apache Hadoop HDFS ................................ SKIPPED [INFO] Apache Hadoop HttpFS .............................. SKIPPED [INFO] Apache Hadoop HDFS BookKeeper Journal ............. SKIPPED [INFO] Apache Hadoop HDFS Project ........................ SKIPPED [INFO] hadoop-yarn ....................................... SKIPPED [INFO] hadoop-yarn-api ................................... SKIPPED [INFO] hadoop-yarn-common ................................ SKIPPED [INFO] hadoop-yarn-server ................................ SKIPPED [INFO] hadoop-yarn-server-common ......................... SKIPPED [INFO] hadoop-yarn-server-nodemanager .................... SKIPPED [INFO] hadoop-yarn-server-web-proxy ...................... SKIPPED [INFO] hadoop-yarn-server-resourcemanager ................ SKIPPED [INFO] hadoop-yarn-server-tests .......................... SKIPPED [INFO] hadoop-mapreduce-client ........................... SKIPPED [INFO] hadoop-mapreduce-client-core ...................... SKIPPED [INFO] hadoop-yarn-applications .......................... SKIPPED [INFO] hadoop-yarn-applications-distributedshell ......... SKIPPED [INFO] hadoop-yarn-site .................................. SKIPPED [INFO] hadoop-mapreduce-client-common .................... SKIPPED [INFO] hadoop-mapreduce-client-shuffle ................... SKIPPED [INFO] hadoop-mapreduce-client-app ....................... SKIPPED [INFO] hadoop-mapreduce-client-hs ........................ SKIPPED [INFO] hadoop-mapreduce-client-jobclient ................. SKIPPED [INFO] Apache Hadoop MapReduce Examples .................. SKIPPED [INFO] hadoop-mapreduce .................................. SKIPPED [INFO] Apache Hadoop MapReduce Streaming ................. SKIPPED [INFO] Apache Hadoop Distributed Copy .................... SKIPPED [INFO] Apache Hadoop Archives ............................ SKIPPED [INFO] Apache Hadoop Rumen ............................... SKIPPED [INFO] Apache Hadoop Gridmix ............................. SKIPPED [INFO] Apache Hadoop Data Join ........................... SKIPPED [INFO] Apache Hadoop Extras .............................. SKIPPED [INFO] Apache Hadoop Pipes ............................... SKIPPED [INFO] Apache Hadoop Tools Dist .......................... SKIPPED [INFO] Apache Hadoop Tools ............................... SKIPPED [INFO] Apache Hadoop Distribution ........................ SKIPPED [INFO] Apache Hadoop Client .............................. SKIPPED [INFO] Apache Hadoop Mini-Cluster ........................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.794s [INFO] Finished at: Fri Jul 20 16:58:22 CST 2012 [INFO] Final Memory: 22M/180M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project hadoop-annotations: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test failed: java.lang.NoClassDefFoundError: org/apache/maven/surefire/report/ReporterFactory; nested exception is java.lang.NoClassDefFoundError: org/apache/maven/surefire/report/ReporterFactory: org.apache.maven.surefire.report.ReporterFactory -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :hadoop-annotations