Unfortunately, we have to activate hadoop1 profile when building against hadoop-1 versions, i.e. mvn  package -Dhadoop.version=1.2.1 -Phadoop1.

This is not necessary for hadoop-2 (just passing a value for the hadoop.version property is sufficient).

 The default hadoop version is 2.2.0 (this is what happens with mvn package)