use shared Jenkins lib

Signed-off-by: olivier lamy <olamy@apache.org>
diff --git a/.gitignore b/.gitignore
index eb5a316..78575d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 target
+*.iml
diff --git a/Jenkinsfile b/Jenkinsfile
index 99b0e58..40d6a42 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -23,36 +23,15 @@
  *
  */
 
-def labels = 'ubuntu'
-def buildJdk = 'JDK 1.8 (latest)'
-def buildMvn = 'Maven 3.5.2'
-def deploySettings = 'archiva-uid-jenkins'
 
-node(labels) {
-
-    cleanWs()
-
-    stage ('Clone Sources') {
-        checkout scm
-    }
-
-    stage ('Build') {
-        withMaven(
-                maven: buildMvn,
-                jdk: buildJdk,
-                mavenSettingsConfig: deploySettings
-        ) {
-            sh "mvn clean install -B -U -e -fae -Dmaven.compiler.fork=false"
-        } 
-    }
-
-    stage ('Deploy') {
-        withMaven(
-                maven: buildMvn,
-                jdk: buildJdk,
-                mavenSettingsConfig: deploySettings
-        ) {
-            sh "mvn deploy -Dmaven.test.skip=true -B -U -e -fae -Dmaven.compiler.fork=false"
+pipeline {
+    stages{
+        stage("Build"){
+            agent { node { label 'ubuntu' } }
+            options { timeout(time: 120, unit: 'MINUTES') }
+            steps{
+                asfStandardBuild params:[cmdline:"clean deploy"]
+            }
         }
     }
 }