1、pom.xml 配置文件:
在pom.xml配置文件中添加
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>cn.bd.bdapp.batch.HfileByMapReduce</mainClass> // 根据自己类名和路径修改
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
2、进入项目路径打包
在项目路径下执行:mvn assembly:assembly
如下图表示打包成功:

3、找到文件打包的路径
一般在项目target目录下会生成一个:project-version-with-dependencies.jar文件
例如我的bdapp-3-jar-with-dependencies.jar
4、上传该包即可。
本文参考地址:
http://lvjun106.iteye.com/blog/1849803