vim 项目根目录/.git/hooks/pre-push并粘贴以下内容

#!/bin/sh

echo "now deploy it ... "
mvn deploy -Dmaven.test.skip=true
if [ $? -eq 0 ]; then
	echo "deploy success"
	exit 0
else
	echo "deploy failed"
	exit 1
fi