Hi Brahma, I tried your way. I think it works! Although there is some other issue coming up (which I need fix later), the build process doesn't complain for too long command line any more.
My previous default maverepo is C:\Users\Ping\.m2\repository and now is changed to D:\mavenrepo. Yes, I did read you and Arun's post in that link. Yes, Arun said it worked but didn't mention whether or not he ended up with using a shorter path. On my situation, I thought the error is probably due to "too long classpath" as there are so many dependencies instead of "too long path" as the default path is only 3 levels longer. But the classpath is long and occupies many lines on my screen. Now as I take your suggestion. It works. Many thanks for your quick response and help!! Ping On Wed, Aug 9, 2017 at 1:45 AM, Brahma Reddy Battula < brahmareddy.batt...@huawei.com> wrote: > It might be problem with maven repo path, may be you can change to shorter > path and check once. > > Example: > > mvn clean install -DskipTests -Dmaven.repo.local=C:\MavenRepo > > > Reference: > http://lucene.472066.n3.nabble.com/Problems-compiling- > hadoop-trunk-on-windows-td4317688.html > > just googled with "The command line is too long + brahma reddy",got the > above link..:) > > > --Brahma Reddy Battula > > -----Original Message----- > From: Ping Liu [mailto:pingpinga...@gmail.com] > Sent: 09 August 2017 16:38 > To: common-dev@hadoop.apache.org > Subject: hadoop-common Maven build failed on Windows due to too long > command line for classpath > > I cannot make Maven build on hadoop-common successful on Windows. The > error shows as follows. > > ... > [INFO] --- native-maven-plugin:1.0-alpha-8:javah (default) @ hadoop-common > --- > [INFO] cmd.exe /X /C "D:\a\tools\java\jdk1.8.0_45\bin\javah -d > D:\apache\hadoop\hadoop-common-project\hadoop-common\target\native\javah > -classpath > D:\apache\hadoop\hadoop-common-project\hadoop-common\target\classes;... > ... > ... > ... > The command line is too long. > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] Apache Hadoop Common ............................... FAILURE > [01:35 min] [INFO] Apache Hadoop NFS .................................. > SKIPPED ... > > The reason is Maven, when running on Windows, can't take too long command > line for classpaths for all the dependencies in local Maven repository. > > I have been exhausted on Google and finally am hoping I can get a quick > help directly from the mailing list. Anyone has any idea about this? > > Any help is appreciated! > > Ping >