BUILDING.txt 2.5 KB

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