add tools to support PGaaS integration

add pom files for check-blueprint-vs-input, repackage
fill in deployment step within mvn script
fix warnings generated during jenkins build

Change-Id: Id8d10180a4e32b5125c586804086ea86c3b85a78
Signed-off-by: Tony Hansen <tony@att.com>
Issue: DCAEGEN2-49
Signed-off-by: Tony Hansen <tony@att.com>
diff --git a/check-blueprint-vs-input/check-blueprint-vs-input b/check-blueprint-vs-input/bin/check-blueprint-vs-input
similarity index 100%
rename from check-blueprint-vs-input/check-blueprint-vs-input
rename to check-blueprint-vs-input/bin/check-blueprint-vs-input
diff --git a/check-blueprint-vs-input/check-blueprint-vs-input.1 b/check-blueprint-vs-input/man/check-blueprint-vs-input.1
similarity index 100%
rename from check-blueprint-vs-input/check-blueprint-vs-input.1
rename to check-blueprint-vs-input/man/check-blueprint-vs-input.1
diff --git a/check-blueprint-vs-input/check-blueprint-vs-input.man b/check-blueprint-vs-input/man/check-blueprint-vs-input.man
similarity index 100%
rename from check-blueprint-vs-input/check-blueprint-vs-input.man
rename to check-blueprint-vs-input/man/check-blueprint-vs-input.man
diff --git a/check-blueprint-vs-input/pom.xml b/check-blueprint-vs-input/pom.xml
new file mode 100644
index 0000000..9af1db6
--- /dev/null
+++ b/check-blueprint-vs-input/pom.xml
@@ -0,0 +1,270 @@
+<?xml version="1.0"?>
+<!--
+================================================================================
+Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+================================================================================
+Licensed 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.
+============LICENSE_END=========================================================
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.onap.dcaegen2</groupId>
+    <artifactId>utils</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <groupId>org.onap.dcaegen2.utils</groupId>
+  <artifactId>check-blueprint-vs-input</artifactId>
+  <name>check-blueprint-vs-input</name>
+  <version>1.0.0-SNAPSHOT</version>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <sonar.skip>true</sonar.skip>
+    <sonar.sources>.</sonar.sources>
+    <!-- customize the SONARQUBE URL -->
+    <!-- sonar.host.url>http://localhost:9000</sonar.host.url -->
+    <!-- below are language dependent -->
+    <!-- for Python -->
+    <sonar.language>py</sonar.language>
+    <sonar.pluginName>Python</sonar.pluginName>
+    <sonar.inclusions>**/*.py</sonar.inclusions>
+    <!-- for JavaScaript -->
+    <!--
+    <sonar.language>js</sonar.language>
+    <sonar.pluginName>JS</sonar.pluginName>
+    <sonar.inclusions>**/*.js</sonar.inclusions>
+    -->
+  </properties>
+  <build>
+    <finalName>${project.artifactId}-${project.version}</finalName>
+    <pluginManagement>
+      <plugins>
+        <!-- the following plugins are invoked from oparent, we do not need them -->
+        <plugin>
+          <groupId>org.sonatype.plugins</groupId>
+          <artifactId>nexus-staging-maven-plugin</artifactId>
+          <version>1.6.7</version>
+          <configuration>
+            <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <!-- This version supports the "deployAtEnd" parameter -->
+          <version>2.8</version>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <!-- first disable the default Java plugins at various stages -->
+        <!-- maven-resources-plugin is called during "*resource" phases by default behavior.  it prepares 
+         the resources dir.  we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>2.6</version>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <!-- maven-compiler-plugin is called during "compile" phases by default behavior.  we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.1</version>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <!-- maven-jar-plugin is called during "compile" phase by default behavior.  we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>2.4</version>
+          <executions>
+            <execution>
+              <id>default-jar</id>
+              <phase/>
+            </execution>
+          </executions>
+        </plugin>
+        <!-- maven-install-plugin is called during "install" phase by default behavior.  it tries to copy stuff under 
+         target dir to ~/.m2.  we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.4</version>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <!-- maven-surefire-plugin is called during "test" phase by default behavior.  it triggers junit test.
+         we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.12.4</version>
+          <configuration>
+            <skipTests>true</skipTests>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>exec-maven-plugin</artifactId>
+          <version>1.2.1</version>
+          <configuration>
+            <executable>${session.executionRootDirectory}/mvn-phase-script.sh</executable>
+            <environmentVariables>
+              <!-- make mvn properties as env for our script -->
+              <MVN_PROJECT_GROUPID>${project.parent.groupId}</MVN_PROJECT_GROUPID>
+              <MVN_PROJECT_ARTIFACTID>${project.parent.artifactId}</MVN_PROJECT_ARTIFACTID>
+              <MVN_PROJECT_VERSION>${project.parent.version}</MVN_PROJECT_VERSION>
+              <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
+              <MVN_RAWREPO_BASEURL_UPLOAD>${onap.nexus.rawrepo.baseurl.upload}</MVN_RAWREPO_BASEURL_UPLOAD>
+              <MVN_RAWREPO_BASEURL_DOWNLOAD>${onap.nexus.rawrepo.baseurl.download}</MVN_RAWREPO_BASEURL_DOWNLOAD>
+              <MVN_RAWREPO_SERVERID>${onap.nexus.rawrepo.serverid}</MVN_RAWREPO_SERVERID>
+              <MVN_DOCKERREGISTRY_DAILY>${onap.nexus.dockerregistry.daily}</MVN_DOCKERREGISTRY_DAILY>
+              <MVN_DOCKERREGISTRY_RELEASE>${onap.nexus.dockerregistry.release}</MVN_DOCKERREGISTRY_RELEASE>
+            </environmentVariables>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <!-- plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.4.1</version>
+        <configuration>
+          <descriptors>
+            <descriptor>assembly/dep.xml</descriptor>
+          </descriptors>
+        </configuration>
+        <executions>
+          <execution>
+            <id>make-assembly</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin -->
+      <!-- now we configure custom action (calling a script) at various lifecycle phases -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.2.1</version>
+        <executions>
+          <execution>
+            <id>clean phase script</id>
+            <phase>clean</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>clean</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-sources script</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>generate-sources</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>compile script</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>compile</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>package script</id>
+            <phase>package</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>package</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>test script</id>
+            <phase>test</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>test</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>install script</id>
+            <phase>install</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>install</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>deploy script</id>
+            <phase>deploy</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>deploy</argument>
+                <argument>bin/check-blueprint-vs-input</argument>
+                <argument>man/check-blueprint-vs-input.1</argument>
+              </arguments>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh
index a4d52d9..78da207 100755
--- a/mvn-phase-script.sh
+++ b/mvn-phase-script.sh
@@ -22,45 +22,82 @@
 echo "running script: [$0] for module [$1] at stage [$2]"
 
 echo "=> Prepare environment "
-#env
+env
 
-TIMESTAMP=$(date +%C%y%m%dT%H%M%S) 
+# This is the base for where "deploy" will upload
+# MVN_NEXUSPROXY is set in the pom.xml
+REPO=$MVN_NEXUSPROXY/content/sites/raw/$MVN_PROJECT_GROUPID
+
+TIMESTAMP=$(date +%C%y%m%dT%H%M%S)
 export BUILD_NUMBER="${TIMESTAMP}"
 
-# expected environment variables 
+# expected environment variables
 if [ -z "${MVN_NEXUSPROXY}" ]; then
     echo "MVN_NEXUSPROXY environment variable not set.  Cannot proceed"
     exit
 fi
 MVN_NEXUSPROXY_HOST=$(echo "$MVN_NEXUSPROXY" |cut -f3 -d'/' | cut -f1 -d':')
-echo "=> Nexu Proxy at $MVN_NEXUSPROXY_HOST, $MVN_NEXUSPROXY"
+echo "=> Nexus Proxy at $MVN_NEXUSPROXY_HOST, $MVN_NEXUSPROXY"
 
 # use the version text detect which phase we are in in LF CICD process: verify, merge, or (daily) release
 
-# mvn phase in life cycle 
+# mvn phase in life cycle
 MVN_PHASE="$2"
+shift 2
 
 case $MVN_PHASE in
 clean)
   echo "==> clean phase script"
+  if [ -f makefile -o -f Makefile ];then make clean; else :; fi
   ;;
 generate-sources)
   echo "==> generate-sources phase script"
+  if [ -f makefile -o -f Makefile ];then make generate-sources; else :; fi
   ;;
 compile)
   echo "==> compile phase script"
+  if [ -f makefile -o -f Makefile ];then make compile; else :; fi
   ;;
 test)
   echo "==> test phase script"
+  if [ -f makefile -o -f Makefile ];then make test; else :; fi
   ;;
 package)
   echo "==> package phase script"
+  if [ -f makefile -o -f Makefile ];then make package; else :; fi
   ;;
 install)
   echo "==> install phase script"
+  if [ -f makefile -o -f Makefile ];then make install; else :; fi
   ;;
 deploy)
   echo "==> deploy phase script"
+  if [ -f makefile -o -f Makefile ];then make deploy
+  else 
+    # Upload all files (listed as additional deployment arguments) to Nexus
+    set -e -x
+    function setnetrc {
+      # Turn off -x so won't leak the credentials
+      set +x
+      hostport=$(echo $1 | cut -f3 -d /)
+      host=$(echo $hostport | cut -f1 -d:)
+      settings=${SETTINGS_FILE:-$HOME/.m2/settings.xml}
+      echo machine $host login $(xpath -q -e "//servers/server[id='$MVN_SERVER_ID']/username/text()" $settings) password $(xpath -q -e "//servers/server[id='$MVN_SERVER_ID']/password/text()" $settings) >$HOME/.netrc
+      chmod 600 $HOME/.netrc
+      set -x
+    }
+    function putraw {
+      curl -X PUT -H "Content-Type: $3" --netrc --upload-file $1 --url $REPO/$2
+    }
+    setnetrc $REPO
+  
+    # additional
+    for artifact
+    do
+      putraw $artifact artifacts/$artifact application/data
+    done
+    set +e +x
+  fi
   ;;
 *)
   echo "==> unprocessed phase"
diff --git a/pom.xml b/pom.xml
index 8143cd7..2c6e57a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,6 +37,8 @@
      <module>python-dcae-policy</module>
      <module>python-discovery-client</module>
      <module>python-dockering</module>
+     <module>check-blueprint-vs-input</module>
+     <module>repackage</module>
   </modules>
 
 </project>
diff --git a/python-cbs-docker-client/pom.xml b/python-cbs-docker-client/pom.xml
index 77de1b9..f2e2ea1 100644
--- a/python-cbs-docker-client/pom.xml
+++ b/python-cbs-docker-client/pom.xml
@@ -131,9 +131,9 @@
             <executable>${session.executionRootDirectory}/mvn-phase-script.sh</executable>
             <environmentVariables>
               <!-- make mvn properties as env for our script -->
-              <MVN_PROJECT_GROUPID>${parent.groupId}</MVN_PROJECT_GROUPID>
-              <MVN_PROJECT_ARTIFACTID>${parent.artifactId}</MVN_PROJECT_ARTIFACTID>
-              <MVN_PROJECT_VERSION>${parent.version}</MVN_PROJECT_VERSION>
+              <MVN_PROJECT_GROUPID>${project.parent.groupId}</MVN_PROJECT_GROUPID>
+              <MVN_PROJECT_ARTIFACTID>${project.parent.artifactId}</MVN_PROJECT_ARTIFACTID>
+              <MVN_PROJECT_VERSION>${project.parent.version}</MVN_PROJECT_VERSION>
               <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
               <MVN_RAWREPO_BASEURL_UPLOAD>${onap.nexus.rawrepo.baseurl.upload}</MVN_RAWREPO_BASEURL_UPLOAD>
               <MVN_RAWREPO_BASEURL_DOWNLOAD>${onap.nexus.rawrepo.baseurl.download}</MVN_RAWREPO_BASEURL_DOWNLOAD>
diff --git a/python-dcae-policy/pom.xml b/python-dcae-policy/pom.xml
index 1d4571f..e5b30c8 100644
--- a/python-dcae-policy/pom.xml
+++ b/python-dcae-policy/pom.xml
@@ -131,9 +131,9 @@
             <executable>${session.executionRootDirectory}/mvn-phase-script.sh</executable>
             <environmentVariables>
               <!-- make mvn properties as env for our script -->
-              <MVN_PROJECT_GROUPID>${parent.groupId}</MVN_PROJECT_GROUPID>
-              <MVN_PROJECT_ARTIFACTID>${parent.artifactId}</MVN_PROJECT_ARTIFACTID>
-              <MVN_PROJECT_VERSION>${parent.version}</MVN_PROJECT_VERSION>
+              <MVN_PROJECT_GROUPID>${project.parent.groupId}</MVN_PROJECT_GROUPID>
+              <MVN_PROJECT_ARTIFACTID>${project.parent.artifactId}</MVN_PROJECT_ARTIFACTID>
+              <MVN_PROJECT_VERSION>${project.parent.version}</MVN_PROJECT_VERSION>
               <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
               <MVN_RAWREPO_BASEURL_UPLOAD>${onap.nexus.rawrepo.baseurl.upload}</MVN_RAWREPO_BASEURL_UPLOAD>
               <MVN_RAWREPO_BASEURL_DOWNLOAD>${onap.nexus.rawrepo.baseurl.download}</MVN_RAWREPO_BASEURL_DOWNLOAD>
diff --git a/python-discovery-client/pom.xml b/python-discovery-client/pom.xml
index bdc9ffd..0b05110 100644
--- a/python-discovery-client/pom.xml
+++ b/python-discovery-client/pom.xml
@@ -131,9 +131,9 @@
             <executable>${session.executionRootDirectory}/mvn-phase-script.sh</executable>
             <environmentVariables>
               <!-- make mvn properties as env for our script -->
-              <MVN_PROJECT_GROUPID>${parent.groupId}</MVN_PROJECT_GROUPID>
-              <MVN_PROJECT_ARTIFACTID>${parent.artifactId}</MVN_PROJECT_ARTIFACTID>
-              <MVN_PROJECT_VERSION>${parent.version}</MVN_PROJECT_VERSION>
+              <MVN_PROJECT_GROUPID>${project.parent.groupId}</MVN_PROJECT_GROUPID>
+              <MVN_PROJECT_ARTIFACTID>${project.parent.artifactId}</MVN_PROJECT_ARTIFACTID>
+              <MVN_PROJECT_VERSION>${project.parent.version}</MVN_PROJECT_VERSION>
               <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
               <MVN_RAWREPO_BASEURL_UPLOAD>${onap.nexus.rawrepo.baseurl.upload}</MVN_RAWREPO_BASEURL_UPLOAD>
               <MVN_RAWREPO_BASEURL_DOWNLOAD>${onap.nexus.rawrepo.baseurl.download}</MVN_RAWREPO_BASEURL_DOWNLOAD>
diff --git a/python-dockering/pom.xml b/python-dockering/pom.xml
index dd5fcdd..37175e5 100644
--- a/python-dockering/pom.xml
+++ b/python-dockering/pom.xml
@@ -131,9 +131,9 @@
             <executable>${session.executionRootDirectory}/mvn-phase-script.sh</executable>
             <environmentVariables>
               <!-- make mvn properties as env for our script -->
-              <MVN_PROJECT_GROUPID>${parent.groupId}</MVN_PROJECT_GROUPID>
-              <MVN_PROJECT_ARTIFACTID>${parent.artifactId}</MVN_PROJECT_ARTIFACTID>
-              <MVN_PROJECT_VERSION>${parent.version}</MVN_PROJECT_VERSION>
+              <MVN_PROJECT_GROUPID>${project.parent.groupId}</MVN_PROJECT_GROUPID>
+              <MVN_PROJECT_ARTIFACTID>${project.parent.artifactId}</MVN_PROJECT_ARTIFACTID>
+              <MVN_PROJECT_VERSION>${project.parent.version}</MVN_PROJECT_VERSION>
               <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
               <MVN_RAWREPO_BASEURL_UPLOAD>${onap.nexus.rawrepo.baseurl.upload}</MVN_RAWREPO_BASEURL_UPLOAD>
               <MVN_RAWREPO_BASEURL_DOWNLOAD>${onap.nexus.rawrepo.baseurl.download}</MVN_RAWREPO_BASEURL_DOWNLOAD>
diff --git a/repackage/pom.xml b/repackage/pom.xml
new file mode 100644
index 0000000..055c087
--- /dev/null
+++ b/repackage/pom.xml
@@ -0,0 +1,272 @@
+<?xml version="1.0"?>
+<!--
+================================================================================
+Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+================================================================================
+Licensed 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.
+============LICENSE_END=========================================================
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.onap.dcaegen2</groupId>
+    <artifactId>utils</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  <groupId>org.onap.dcaegen2.utils</groupId>
+  <artifactId>repackage</artifactId>
+  <name>repackage</name>
+  <version>1.0.0-SNAPSHOT</version>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <sonar.skip>true</sonar.skip>
+    <sonar.sources>.</sonar.sources>
+    <!-- customize the SONARQUBE URL -->
+    <!-- sonar.host.url>http://localhost:9000</sonar.host.url -->
+    <!-- below are language dependent -->
+    <!-- for Python -->
+    <sonar.language>py</sonar.language>
+    <sonar.pluginName>Python</sonar.pluginName>
+    <sonar.inclusions>**/*.py</sonar.inclusions>
+    <!-- for JavaScaript -->
+    <!--
+    <sonar.language>js</sonar.language>
+    <sonar.pluginName>JS</sonar.pluginName>
+    <sonar.inclusions>**/*.js</sonar.inclusions>
+    -->
+  </properties>
+  <build>
+    <finalName>${project.artifactId}-${project.version}</finalName>
+    <pluginManagement>
+      <plugins>
+        <!-- the following plugins are invoked from oparent, we do not need them -->
+        <plugin>
+          <groupId>org.sonatype.plugins</groupId>
+          <artifactId>nexus-staging-maven-plugin</artifactId>
+          <version>1.6.7</version>
+          <configuration>
+            <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <!-- This version supports the "deployAtEnd" parameter -->
+          <version>2.8</version>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <!-- first disable the default Java plugins at various stages -->
+        <!-- maven-resources-plugin is called during "*resource" phases by default behavior.  it prepares
+         the resources dir.  we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>2.6</version>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <!-- maven-compiler-plugin is called during "compile" phases by default behavior.  we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.1</version>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <!-- maven-jar-plugin is called during "compile" phase by default behavior.  we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>2.4</version>
+          <executions>
+            <execution>
+              <id>default-jar</id>
+              <phase/>
+            </execution>
+          </executions>
+        </plugin>
+        <!-- maven-install-plugin is called during "install" phase by default behavior.  it tries to copy stuff under
+         target dir to ~/.m2.  we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.4</version>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
+        <!-- maven-surefire-plugin is called during "test" phase by default behavior.  it triggers junit test.
+         we do not need it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.12.4</version>
+          <configuration>
+            <skipTests>true</skipTests>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>exec-maven-plugin</artifactId>
+          <version>1.2.1</version>
+          <configuration>
+            <executable>${session.executionRootDirectory}/mvn-phase-script.sh</executable>
+            <environmentVariables>
+              <!-- make mvn properties as env for our script -->
+              <MVN_PROJECT_GROUPID>${project.parent.groupId}</MVN_PROJECT_GROUPID>
+              <MVN_PROJECT_ARTIFACTID>${project.parent.artifactId}</MVN_PROJECT_ARTIFACTID>
+              <MVN_PROJECT_VERSION>${project.parent.version}</MVN_PROJECT_VERSION>
+              <MVN_NEXUSPROXY>${onap.nexus.url}</MVN_NEXUSPROXY>
+              <MVN_RAWREPO_BASEURL_UPLOAD>${onap.nexus.rawrepo.baseurl.upload}</MVN_RAWREPO_BASEURL_UPLOAD>
+              <MVN_RAWREPO_BASEURL_DOWNLOAD>${onap.nexus.rawrepo.baseurl.download}</MVN_RAWREPO_BASEURL_DOWNLOAD>
+              <MVN_RAWREPO_SERVERID>${onap.nexus.rawrepo.serverid}</MVN_RAWREPO_SERVERID>
+              <MVN_DOCKERREGISTRY_DAILY>${onap.nexus.dockerregistry.daily}</MVN_DOCKERREGISTRY_DAILY>
+              <MVN_DOCKERREGISTRY_RELEASE>${onap.nexus.dockerregistry.release}</MVN_DOCKERREGISTRY_RELEASE>
+            </environmentVariables>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <!-- plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.4.1</version>
+        <configuration>
+          <descriptors>
+            <descriptor>assembly/dep.xml</descriptor>
+          </descriptors>
+        </configuration>
+        <executions>
+          <execution>
+            <id>make-assembly</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin -->
+      <!-- now we configure custom action (calling a script) at various lifecycle phases -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.2.1</version>
+        <executions>
+          <execution>
+            <id>clean phase script</id>
+            <phase>clean</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>clean</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>generate-sources script</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>generate-sources</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>compile script</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>compile</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>package script</id>
+            <phase>package</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>package</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>test script</id>
+            <phase>test</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>test</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>install script</id>
+            <phase>install</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>install</argument>
+              </arguments>
+            </configuration>
+          </execution>
+          <execution>
+            <id>deploy script</id>
+            <phase>deploy</phase>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <configuration>
+              <arguments>
+                <argument>${project.artifactId}</argument>
+                <argument>deploy</argument>
+                <argument>bin/repackage</argument>
+                <argument>bin/yamltojson</argument>
+                <argument>man/repackage.1</argument>
+                <argument>man/yamltojson.1</argument>
+              </arguments>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>