Danie, You need to force ivy to pick up common jar from your local repository. Otherwise it downloads from the maven.org. Try this: 1. build hadoop-common.
2. 'ant mvn-install' - this should install it into the local repository. Ant will output the new location of the jars. You should see something like this at the end: [artifact:install] [INFO] Installing /Users/usr../hadoop-common/build/hadoop-common-0.22.0-SNAPSHOT.jar to /Users/usr_home/.m2/repository/org/apache/hadoop/hadoop-common/0.22.0-SNAPSH OT/hadoop-common-0.22.0-SNAPSHOT.jar 3. cd to hadoop-hdfs. 4. 'ant veryclean' - Or alternatively - remove all hadoop-common*.jar from ~/.m2 directory. This is needed to guarantee that ivy will try to get a new version of the common jar. 5. 'ant -Dresolvers=internal jar-test' - You can use any other target, but make sure 'resolvers' is set to 'internal'. That will force ivy to get stuff from local repository. Watch the build - you should see something like this: Downloading /Users/user/.m2/repository/org/apache/hadoop/hadoop-common/0.23.0-SNAPSHOT/h adoop-common-0.23.0-SNAPSHOT.jar ... [ivy:resolve] ....................... (1364kB) [ivy:resolve] [SUCCESSFUL ] org.apache.hadoop#hadoop-common;0.23.0-SNAPSHOT!hadoop-common.jar (71ms) On 3/8/11 1:06 AM, "Daniel Aris Pandu Prasetia" <[email protected]> wrote: > Hi, Does this mean that Ivy Repository has not been updated with Hadoop > 0.21.0 yet? Then, is there any alternative to build Hadoop instead of using > ant/ivy? Thank you, Best > Regards, Daniel ________________________________ From: Daniel Aris Pandu > Prasetia <[email protected]> To: [email protected] Sent: > Tuesday, 8 March 2011 04:49:14 Subject: Re: Need Help Building Hadoop from > source Hi, Thank you very much for the reply. I tried "ant clean clean-cache > mvn-install" in common, but clean-cache doesn't seems to be working so I > tried "ant clean mvn-install" instead. This however does not seems to solve > the problem and I produced the very same error message (unable to resolve > dependencies). Any other suggestion that I can try? Thank you very > much Best Regards, Daniel --- On Tue, 8/3/11, Harsh J > <[email protected]> wrote: From: Harsh J > <[email protected]> Subject: Re: Need Help Building Hadoop from > source To: [email protected] Date: Tuesday, 8 March, 2011, 2:00 > AM Hello, On Tue, Mar 8, 2011 at 1:22 AM, Daniel Aris Pandu > Prasetia <[email protected]> wrote: > > Hi, > > I am sorry if this > question was asked a lot of times before but I am unable to >solve my > problem. I am trying to build hadoop 0.21.0 from the source. As far as >my > understanding goes, I need to build common, hdfs, and mapred. I seems to be > >able to build common, but not hdfs and mapred. Here is the error I > receive: Does this suggestion from the archives > help?: http://mail-archives.apache.org/mod_mbox/hadoop-mapreduce-user/201102.m > box/%[email protected]%3E -- Harsh > J www.harshj.com
