Fix building script to generate the maven artifacts

Signed-off-by: Lin Gao <aoingl@gmail.com>