@@ -5,7 +5,6 @@ Requirements:
55
66* Unix System
77* JDK 1.8
8- * Maven 3.3 or later
98* Boost 1.86.0 (if compiling native code)
109* Protocol Buffers 3.21.12 (if compiling native code)
1110* CMake 3.19 or newer (if compiling native code)
@@ -62,8 +61,6 @@ Refer to dev-support/docker/Dockerfile):
6261* Open JDK 1.8
6362 $ sudo apt-get update
6463 $ sudo apt-get -y install openjdk-8-jdk
65- * Maven
66- $ sudo apt-get -y install maven
6764* Native libraries
6865 $ sudo apt-get -y install build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev libsasl2-dev
6966* GCC 9.3.0
@@ -139,19 +136,19 @@ Where to run Maven from?
139136----------------------------------------------------------------------------------
140137Maven build goals:
141138
142- * Clean : mvn clean [-Preleasedocs]
143- * Compile : mvn compile [-Pnative]
144- * Run tests : mvn test [-Pnative] [-Pshelltest]
145- * Create JAR : mvn package
146- * Run spotbugs : mvn compile spotbugs:spotbugs
147- * Run checkstyle : mvn compile checkstyle:checkstyle
148- * Install JAR in M2 cache : mvn install
149- * Deploy JAR to Maven repo : mvn deploy
150- * Run clover : mvn test -Pclover
151- * Run Rat : mvn apache-rat:check
152- * Build javadocs : mvn javadoc:javadoc
153- * Build distribution : mvn package [-Pdist][-Pdocs][-Psrc][-Pnative][-Dtar][-Preleasedocs][-Pyarn-ui]
154- * Change Hadoop version : mvn versions:set -DnewVersion=NEWVERSION
139+ * Clean : ./mvnw clean [-Preleasedocs]
140+ * Compile : ./mvnw compile [-Pnative]
141+ * Run tests : ./mvnw test [-Pnative] [-Pshelltest]
142+ * Create JAR : ./mvnw package
143+ * Run spotbugs : ./mvnw compile spotbugs:spotbugs
144+ * Run checkstyle : ./mvnw compile checkstyle:checkstyle
145+ * Install JAR in M2 cache : ./mvnw install
146+ * Deploy JAR to Maven repo : ./mvnw deploy
147+ * Run clover : ./mvnw test -Pclover
148+ * Run Rat : ./mvnw apache-rat:check
149+ * Build javadocs : ./mvnw javadoc:javadoc
150+ * Build distribution : ./mvnw package [-Pdist][-Pdocs][-Psrc][-Pnative][-Dtar][-Preleasedocs][-Pyarn-ui]
151+ * Change Hadoop version : ./mvnw versions:set -DnewVersion=NEWVERSION
155152
156153 Build options:
157154
@@ -244,10 +241,10 @@ Maven build goals:
244241 * -Dtest=<TESTCLASSNAME>,<TESTCLASSNAME#METHODNAME>,....
245242 * -Dtest.exclude=<TESTCLASSNAME>
246243 * -Dtest.exclude.pattern=**/<TESTCLASSNAME1>.java,**/<TESTCLASSNAME2>.java
247- * To run all native unit tests, use: mvn test -Pnative -Dtest=allNative
248- * To run a specific native unit test, use: mvn test -Pnative -Dtest=<test>
244+ * To run all native unit tests, use: ./mvnw test -Pnative -Dtest=allNative
245+ * To run a specific native unit test, use: ./mvnw test -Pnative -Dtest=<test>
249246 For example, to run test_bulk_crc32, you would use:
250- mvn test -Pnative -Dtest=test_bulk_crc32
247+ ./mvnw test -Pnative -Dtest=test_bulk_crc32
251248
252249 Intel ISA-L build options:
253250
@@ -279,7 +276,7 @@ Maven build goals:
279276 OWASP's dependency-check plugin will scan the third party dependencies
280277 of this project for known CVEs (security vulnerabilities against them).
281278 It will produce a report in target/dependency-check-report.html. To
282- invoke, run 'mvn dependency-check:aggregate'.
279+ invoke, run './mvnw dependency-check:aggregate'.
283280
284281 PMDK library build options:
285282
@@ -348,7 +345,7 @@ If you are building a submodule directory, all the hadoop dependencies this
348345submodule has will be resolved as all other 3rd party dependencies. This is,
349346from the Maven cache or from a Maven repository (if not available in the cache
350347or the SNAPSHOT 'timed out').
351- An alternative is to run 'mvn install -DskipTests' from Hadoop source top
348+ An alternative is to run './mvnw install -DskipTests' from Hadoop source top
352349level once; and then work from the submodule. Keep in mind that SNAPSHOTs
353350time out after a while, using the Maven '-nsu' will stop Maven from trying
354351to update SNAPSHOTs from external repos.
@@ -358,7 +355,7 @@ Importing projects to eclipse
358355
359356At first, install artifacts including hadoop-maven-plugins at the top of the source tree.
360357
361- $ mvn clean install -DskipTests -DskipShade
358+ $ ./mvnw clean install -DskipTests -DskipShade
362359
363360Then, import to eclipse by specifying the root directory of the project via
364361[File] > [Import] > [Maven] > [Existing Maven Projects].
@@ -368,23 +365,23 @@ Building distributions:
368365
369366Create binary distribution without native code and without Javadocs:
370367
371- $ mvn package -Pdist -DskipTests -Dtar -Dmaven.javadoc.skip=true
368+ $ ./mvnw package -Pdist -DskipTests -Dtar -Dmaven.javadoc.skip=true
372369
373370Create binary distribution with native code:
374371
375- $ mvn package -Pdist,native -DskipTests -Dtar
372+ $ ./mvnw package -Pdist,native -DskipTests -Dtar
376373
377374Create source distribution:
378375
379- $ mvn package -Psrc -DskipTests
376+ $ ./mvnw package -Psrc -DskipTests
380377
381378Create source and binary distributions with native code:
382379
383- $ mvn package -Pdist,native,src -DskipTests -Dtar
380+ $ ./mvnw package -Pdist,native,src -DskipTests -Dtar
384381
385382Create a local staging version of the website (in /tmp/hadoop-site)
386383
387- $ mvn site site:stage -Preleasedocs,docs -DstagingDirectory=/tmp/hadoop-site
384+ $ ./mvnw site site:stage -Preleasedocs,docs -DstagingDirectory=/tmp/hadoop-site
388385
389386Note that the site needs to be built in a second pass after other artifacts.
390387
@@ -406,13 +403,7 @@ Handling out of memory errors in builds
406403----------------------------------------------------------------------------------
407404
408405If the build process fails with an out of memory error, you should be able to fix
409- it by increasing the memory used by maven which can be done via the environment
410- variable MAVEN_OPTS.
411-
412- Here is an example setting to allocate between 256 MB and 1.5 GB of heap space to
413- Maven
414-
415- export MAVEN_OPTS="-Xms256m -Xmx1536m"
406+ it by increasing the memory used by maven which can be done by modifying .mvn/jvm.config.
416407
417408----------------------------------------------------------------------------------
418409
@@ -424,12 +415,11 @@ Installing required dependencies for clean install of macOS 10.14:
424415* Install Xcode Command Line Tools
425416 $ xcode-select --install
426417* Install Homebrew
427- $ /usr/ bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master /install)"
418+ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD /install.sh )"
428419* Install OpenJDK 8
429- $ brew tap AdoptOpenJDK/openjdk
430- $ brew cask install adoptopenjdk8
431- * Install maven and tools
432- $ brew install maven autoconf automake cmake wget
420+ $ brew install openjdk@8
421+ * Install toolchains
422+ $ brew install autoconf automake cmake wget
433423* Install native libraries, only openssl is required to compile native code,
434424you may optionally install zlib, lz4, etc.
435425 $ brew install openssl
@@ -451,7 +441,7 @@ you need to backport both YARN-8622 and YARN-9487 in order to build native code.
451441Building command example:
452442
453443* Create binary distribution with native code but without documentation:
454- $ mvn package -Pdist,native -DskipTests -Dmaven.javadoc.skip \
444+ $ ./mvnw package -Pdist,native -DskipTests -Dmaven.javadoc.skip \
455445 -Dopenssl.prefix=/usr/local/opt/openssl
456446
457447Note that the command above manually specified the openssl library and include
@@ -465,9 +455,9 @@ Building on CentOS 8
465455----------------------------------------------------------------------------------
466456
467457
468- * Install development tools such as GCC, autotools, OpenJDK and Maven .
458+ * Install development tools such as GCC, autotools, OpenJDK.
469459 $ sudo dnf group install --with-optional 'Development Tools'
470- $ sudo dnf install java-1.8.0-openjdk-devel maven
460+ $ sudo dnf install java-1.8.0-openjdk-devel
471461
472462* Install python2 for building documentation.
473463 $ sudo dnf install python2
@@ -528,7 +518,6 @@ Requirements:
528518
529519* Windows 10
530520* JDK 1.8
531- * Maven 3.3 or later (maven.apache.org)
532521* Boost 1.86.0 (boost.org)
533522* Protocol Buffers 3.21.12 (https://github.com/protocolbuffers/protobuf/tags)
534523* CMake 3.19 or newer (cmake.org)
@@ -538,7 +527,7 @@ Requirements:
538527* Zlib (zlib.net, if building native code bindings for zlib)
539528* Git (preferably, get this from https://git-scm.com/download/win since the package also contains
540529 Unix command-line tools that are needed during packaging).
541- * Python (python.org, for generation of docs using 'mvn site')
530+ * Python (python.org, for generation of docs using 'mvnw.cmd site')
542531* Internet connection for first build (to fetch all Maven and Hadoop dependencies)
543532
544533----------------------------------------------------------------------------------
@@ -610,7 +599,6 @@ OpenSSL and Zlib dependencies. Run the following commands to setup these depende
610599Set the following environment variables -
611600(Assuming that vcpkg was checked out at C:\vcpkg)
612601> set PROTOBUF_HOME=C:\vcpkg\installed\x64-windows
613- > set MAVEN_OPTS=-Xmx2048M -Xss128M
614602
615603All Maven goals are the same as described above with the exception that
616604native code is built by enabling the 'native-win' Maven profile. -Pnative-win
@@ -641,7 +629,7 @@ container. The Docker image does not have a full VS install, so you need to add
641629
642630> set classpath=
643631> set PROTOBUF_HOME=C:\vcpkg\installed\x64-windows
644- > mvn clean package -Dhttps.protocols=TLSv1.2 -DskipTests -DskipDocs -Pnative-win,dist -Dskip.platformToolsetDetection^
632+ > mvnw.cmd clean package -Dhttps.protocols=TLSv1.2 -DskipTests -DskipDocs -Pnative-win,dist -Dskip.platformToolsetDetection^
645633 -Drequire.openssl -Drequire.test.libhadoop -Pyarn-ui -Dshell-executable=C:\Git\bin\bash.exe^
646634 -Dtar -Dopenssl.prefix=C:\vcpkg\installed\x64-windows^
647635 -Dcmake.prefix.path=C:\vcpkg\installed\x64-windows^
@@ -665,7 +653,7 @@ letter (like 'h') and rebuild -
665653----------------------------------------------------------------------------------
666654Building distributions:
667655
668- * Build distribution with native code : mvn package [-Pdist][-Pdocs][-Psrc][-Dtar][-Dmaven.javadoc.skip=true]
656+ * Build distribution with native code : mvnw.cmd package [-Pdist][-Pdocs][-Psrc][-Dtar][-Dmaven.javadoc.skip=true]
669657
670658----------------------------------------------------------------------------------
671659Running compatibility checks with checkcompatibility.py
@@ -683,6 +671,6 @@ Changing the Hadoop version declared returned by VersionInfo
683671
684672If for compatibility reasons the version of Hadoop has to be declared as a 2.x release in the information returned by
685673org.apache.hadoop.util.VersionInfo, set the property declared.hadoop.version to the desired version.
686- For example: mvn package -Pdist -Ddeclared.hadoop.version=2.11
674+ For example: mvnw.cmd package -Pdist -Ddeclared.hadoop.version=2.11
687675
688676If unset, the project version declared in the POM file is used.
0 commit comments