[SCB-1639] the configuration about deploying jars  to snapshot repository

Signed-off-by: MabinGo <bin.ma@huawei.com>
diff --git a/.travis.settings.xml b/.travis.settings.xml
new file mode 100644
index 0000000..6c2fd59
--- /dev/null
+++ b/.travis.settings.xml
@@ -0,0 +1,32 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+  <servers>
+    <server>
+      <id>apache.snapshots.https</id>
+      <username>${env.SONATYPE_USERNAME}</username>
+      <password>${env.SONATYPE_PASSWORD}</password>
+    </server>
+    <server>
+      <id>apache.releases.https</id>
+      <username>${env.SONATYPE_USERNAME}</username>
+      <password>${env.SONATYPE_PASSWORD}</password>
+    </server>
+  </servers>
+</settings>
diff --git a/.travis.yml b/.travis.yml
index faaba71..513de34 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,9 +32,11 @@
   - "$HOME/.m2"
 
 language: java
-
-install: true
 jdk:
 - openjdk8
-
-script: ./scripts/test.sh
+jobs:
+  include:
+  - stage: Test
+    script: ./scripts/test.sh
+  - stage: Deploy on
+    script: if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then bash ./scripts/deploy.sh; fi
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
new file mode 100755
index 0000000..b68544c
--- /dev/null
+++ b/scripts/deploy.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash

+## ---------------------------------------------------------------------------

+## Licensed to the Apache Software Foundation (ASF) under one or more

+## contributor license agreements.  See the NOTICE file distributed with

+## this work for additional information regarding copyright ownership.

+## The ASF licenses this file to You under the Apache License, Version 2.0

+## (the "License"); you may not use this file except in compliance with

+## the License.  You may obtain a copy of the License at

+##

+##      http://www.apache.org/licenses/LICENSE-2.0

+##

+## Unless required by applicable law or agreed to in writing, software

+## distributed under the License is distributed on an "AS IS" BASIS,

+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+## See the License for the specific language governing permissions and

+## limitations under the License.

+## ---------------------------------------------------------------------------

+#bin/sh

+

+echo "Deploy a Non-Signed Staging Release"

+mvn deploy -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -DskipTests --settings .travis.settings.xml

+if [ $? == 0 ]; then

+	echo "${green}Snapshot Deployment is Success, please log on to Nexus Repo to see the snapshot release..${reset}"

+else

+	echo "${red}Snapshot deployment failed.${reset}"

+fi

+

+echo "Deployment Completed"