BUILDING.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Build instructions for Hadoop Common/HDFS using Maven
  2. ----------------------------------------------------------------------------------
  3. Requirements:
  4. * Unix System
  5. * JDK 1.6
  6. * Maven 3.0
  7. * Forrest 0.8 (if generating docs)
  8. * Findbugs 1.3.9 (if running findbugs)
  9. * Autotools (if compiling native code)
  10. * Internet connection for first build (to fetch all Maven and Hadoop dependencies)
  11. ----------------------------------------------------------------------------------
  12. Maven modules:
  13. hadoop (Main Hadoop project)
  14. - hadoop-project (Parent POM for all Hadoop Maven modules. )
  15. (All plugins & dependencies versions are defined here.)
  16. - hadoop-project-dist (Parent POM for modules that generate distributions.)
  17. - hadoop-annotations (Generates the Hadoop doclet used to generated the Javadocs)
  18. - hadoop-common (Hadoop Common)
  19. - hadoop-hdfs (Hadoop HDFS)
  20. ----------------------------------------------------------------------------------
  21. Where to run Maven from?
  22. It can be run from any module. The only catch is that if not run from utrunk
  23. all modules that are not part of the build run must be installed in the local
  24. Maven cache or available in a Maven repository.
  25. ----------------------------------------------------------------------------------
  26. Maven build goals:
  27. * Clean : mvn clean
  28. * Compile : mvn compile [-Pnative]
  29. * Run tests : mvn test [-Pnative]
  30. * Create JAR : mvn package
  31. * Run findbugs : mvn compile findbugs:findbugs
  32. * Run checkstyle : mvn compile checkstyle:checkstyle
  33. * Install JAR in M2 cache : mvn install
  34. * Deploy JAR to Maven repo : mvn deploy
  35. * Run clover : mvn test -Pclover [-DcloverLicenseLocation=${user.name}/.clover.license]
  36. * Run Rat : mvn apache-rat:check
  37. * Build javadocs : mvn javadoc:javadoc
  38. * Build distribution : mvn package [-Pdist][-Pdocs][-Psrc][-Pnative][-Dtar]
  39. Build options:
  40. * Use -Pnative to compile/bundle native code
  41. * Use -Dsnappy.prefix=(/usr/local) & -Dbundle.snappy=(false) to compile
  42. Snappy JNI bindings and to bundle Snappy SO files
  43. * Use -Pdocs to generate & bundle the documentation in the distribution (using -Pdist)
  44. * Use -Psrc to bundle the source in the distribution (using -Pdist)
  45. * Use -Dtar to create a TAR with the distribution (using -Pdist)
  46. Tests options:
  47. * Use -DskipTests to skip tests when running the following Maven goals:
  48. 'package', 'install', 'deploy' or 'verify'
  49. * -Dtest=<TESTCLASSNAME>,....
  50. * -Dtest.exclude=<TESTCLASSNAME>
  51. * -Dtest.exclude.pattern=**/<TESTCLASSNAME1>.java,**/<TESTCLASSNAME2>.java
  52. ----------------------------------------------------------------------------------