diff --git a/openecomp-be/pom.xml b/openecomp-be/pom.xml
index b603499..6cfc23a 100644
--- a/openecomp-be/pom.xml
+++ b/openecomp-be/pom.xml
@@ -87,13 +87,6 @@
                 <groupId>org.openecomp.sdc.onboarding</groupId>
                 <artifactId>compile-helper-plugin</artifactId>
                 <version>${project.version}</version>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.openecomp.sdc.onboarding</groupId>
-                        <artifactId>pmd-helper-plugin</artifactId>
-                        <version>${project.version}</version>
-                    </dependency>
-                </dependencies>
                 <executions>
                     <execution>
                         <goals>
@@ -118,87 +111,6 @@
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-pmd-plugin</artifactId>
-                <version>${maven.pmd.plugin.version}</version>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.openecomp.sdc</groupId>
-                        <artifactId>build-tools</artifactId>
-                        <version>${build.tools.version}</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>net.sourceforge.pmd</groupId>
-                        <artifactId>pmd-core</artifactId>
-                        <version>${pmd.core.version}</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>net.sourceforge.pmd</groupId>
-                        <artifactId>pmd-java</artifactId>
-                        <version>${pmd.java.version}</version>
-                    </dependency>
-                </dependencies>
-                <configuration>
-                    <skip>${skipPMD}</skip>
-                    <showPmdLog>false</showPmdLog>
-                    <analysisCache>false</analysisCache>
-                    <analysisCacheLocation>${project.build.directory}/pmd/pmd.cache</analysisCacheLocation>
-                    <failOnViolation>false</failOnViolation>
-                    <printFailingErrors>false</printFailingErrors>
-                    <format>csv</format>
-                    <targetDirectory>${project.build.directory}/pmd</targetDirectory>
-                    <includeTests>true</includeTests>
-                    <linkXRef>false</linkXRef>
-                    <aggregate>false</aggregate>
-                    <rulesets>
-                        <ruleset>/category/java/bestpractices.xml</ruleset>
-                        <ruleset>/category/java/codestyle.xml</ruleset>
-                        <ruleset>/category/java/design.xml</ruleset>
-                        <ruleset>/category/java/errorprone.xml</ruleset>
-                        <ruleset>/category/java/multithreading.xml</ruleset>
-                        <ruleset>/category/java/performance.xml</ruleset>
-                        <ruleset>/category/java/security.xml</ruleset>
-                    </rulesets>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>check</goal>
-                        </goals>
-                        <phase>integration-test</phase>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.openecomp.sdc.onboarding</groupId>
-                <artifactId>pmd-helper-plugin</artifactId>
-                <version>${project.version}</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>init-pmd-helper</goal>
-                            <goal>post-verify-helper</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <excludePackaging>pom</excludePackaging>
-                    <pmdTargetLocation>${project.build.directory}/pmd/pmd.xml</pmdTargetLocation>
-                    <pmdFailureReportLocation>${project.build.directory}/pmd.txt</pmdFailureReportLocation>
-                    <pmdReportFile>${project.build.directory}/pmd/pmd.csv</pmdReportFile>
-                    <persistingModuleCoordinates>org.openecomp.sdc:build-data-installer</persistingModuleCoordinates>
-                    <pmdCurrentStateFilePath>org.openecomp.sdc:sdc-onboarding/target/build-data/pmdState.dat
-                    </pmdCurrentStateFilePath>
-                    <pmdStateFile>${project.build.outputDirectory}/pmd.dat</pmdStateFile>
-                    <compiledFilesList>
-                        ${project.build.directory}/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
-                    </compiledFilesList>
-                    <compiledTestFilesList>
-                        ${project.build.directory}/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
-                    </compiledTestFilesList>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
                 <version>${mvn.jar.version}</version>
                 <configuration>
diff --git a/openecomp-be/tools/artifact-copy-plugin/pom.xml b/openecomp-be/tools/artifact-copy-plugin/pom.xml
index b06b4a9..7eb7d4c 100644
--- a/openecomp-be/tools/artifact-copy-plugin/pom.xml
+++ b/openecomp-be/tools/artifact-copy-plugin/pom.xml
@@ -11,10 +11,9 @@
         <artifactId>sdc-onboarding</artifactId>
         <groupId>org.openecomp.sdc</groupId>
         <version>1.3.0-SNAPSHOT</version>
-        <relativePath>../../../onboarding</relativePath>
+        <relativePath>../../../onboarding/pom.xml</relativePath>
     </parent>
     <properties>
-        <skipPMD>true</skipPMD>
         <classes>classes/**/*.class</classes>
         <mavenStatus>maven-status/**</mavenStatus>
         <skipTestRun>true</skipTestRun>
diff --git a/openecomp-be/tools/build-data-installer/pom.xml b/openecomp-be/tools/build-data-installer/pom.xml
index 2d79e47..74890ad 100644
--- a/openecomp-be/tools/build-data-installer/pom.xml
+++ b/openecomp-be/tools/build-data-installer/pom.xml
@@ -4,44 +4,18 @@
          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>
 
-    <groupId>org.openecomp.sdc</groupId>
     <artifactId>build-data-installer</artifactId>
 
     <parent>
         <artifactId>sdc-onboarding</artifactId>
         <groupId>org.openecomp.sdc</groupId>
         <version>1.3.0-SNAPSHOT</version>
-        <relativePath>../../../onboarding</relativePath>
+        <relativePath>../../../onboarding/pom.xml</relativePath>
     </parent>
-    <properties>
-        <skipPMD>true</skipPMD>
-    </properties>
     <build>
     <plugins>
         <plugin>
             <groupId>org.openecomp.sdc.onboarding</groupId>
-            <artifactId>pmd-helper-plugin</artifactId>
-            <version>${project.version}</version>
-            <executions>
-                <execution>
-                    <goals>
-                        <goal>init-pmd-helper</goal>
-                        <goal>post-verify-helper</goal>
-                    </goals>
-                </execution>
-            </executions>
-            <configuration>
-                <excludePackaging>pom</excludePackaging>
-                <pmdTargetLocation>${project.build.directory}/pmd/pmd.xml</pmdTargetLocation>
-                <pmdReportFile>${project.build.directory}/pmd/pmd.csv</pmdReportFile>
-                <pmdFailureReportLocation>${project.build.directory}/pmd.txt</pmdFailureReportLocation>
-                <persistingModuleCoordinates>org.openecomp.sdc:build-data-installer</persistingModuleCoordinates>
-                <pmdCurrentStateFilePath>org.openecomp.sdc:sdc-onboarding/target/build-data/pmdState.dat</pmdCurrentStateFilePath>
-                <pmdStateFile>${project.build.outputDirectory}/pmd.dat</pmdStateFile>
-            </configuration>
-        </plugin>
-        <plugin>
-            <groupId>org.openecomp.sdc.onboarding</groupId>
             <artifactId>artifact-copy-plugin</artifactId>
             <version>${project.version}</version>
             <executions>
diff --git a/openecomp-be/tools/pmd-helper-plugin/pom.xml b/openecomp-be/tools/pmd-helper-plugin/pom.xml
deleted file mode 100644
index 2442ae5..0000000
--- a/openecomp-be/tools/pmd-helper-plugin/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-
-    <groupId>org.openecomp.sdc.onboarding</groupId>
-    <artifactId>pmd-helper-plugin</artifactId>
-    <packaging>maven-plugin</packaging>
-
-    <parent>
-        <artifactId>sdc-onboarding</artifactId>
-        <groupId>org.openecomp.sdc</groupId>
-        <version>1.3.0-SNAPSHOT</version>
-        <relativePath>../../../onboarding</relativePath>
-    </parent>
-    <properties>
-        <skipPMD>true</skipPMD>
-        <classes>classes/**/*.class</classes>
-        <mavenStatus>maven-status/**</mavenStatus>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-core</artifactId>
-            <version>${maven-core.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.maven.plugin-tools</groupId>
-            <artifactId>maven-plugin-annotations</artifactId>
-            <version>${maven-plugin-annotations.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-plugin-plugin</artifactId>
-                <version>${maven-plugin-plugin.version}</version>
-            </plugin>
-        </plugins>
-    </build>
-
-</project>
\ No newline at end of file
diff --git a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/InitializationHelperMojo.java b/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/InitializationHelperMojo.java
deleted file mode 100644
index 5b4d5fd..0000000
--- a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/InitializationHelperMojo.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright © 2018 European Support Limited
- *
- * 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 a "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.
- */
-
-package org.openecomp.sdc.onboarding.pmd;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.apache.maven.project.MavenProject;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.io.UncheckedIOException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
-import java.util.List;
-import java.util.Map;
-
-import static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.*;
-
-@Mojo(name = "init-pmd-helper", threadSafe = true, defaultPhase = LifecyclePhase.PREPARE_PACKAGE,
-        requiresDependencyResolution = ResolutionScope.NONE)
-public class InitializationHelperMojo extends AbstractMojo {
-
-    private static final String SKIP_PMD = "skipPMD";
-
-    @Parameter(defaultValue = "${project}", readonly = true)
-    private MavenProject project;
-    @Parameter(defaultValue = "${project.artifact.groupId}:${project.artifact.artifactId}")
-    private String moduleCoordinates;
-    @Parameter
-    private File pmdTargetLocation;
-    @Parameter
-    private File pmdReportFile;
-    @Parameter
-    private String persistingModuleCoordinates;
-    @Parameter
-    private File pmdStateFile;
-    @Parameter
-    private String pmdCurrentStateFilePath;
-    @Parameter
-    private String excludePackaging;
-
-    static {
-        PMDState.setHistoricState(readCurrentPMDState("pmd.dat"));
-    }
-
-    public void execute() throws MojoExecutionException, MojoFailureException {
-        if (project.getPackaging().equals(excludePackaging)) {
-            return;
-        }
-        if (moduleCoordinates.equals(persistingModuleCoordinates)) {
-            pmdStateFile.getParentFile().mkdirs();
-            try (OutputStream os = new FileOutputStream(pmdStateFile);
-                 ObjectOutputStream oos = new ObjectOutputStream(os)) {
-                File f = getStateFile(pmdCurrentStateFilePath.substring(0, pmdCurrentStateFilePath.indexOf('/')),
-                        project, pmdCurrentStateFilePath);
-                Map<String, List<Violation>> data = readCurrentPMDState(f);
-                if (PMDState.getHistoricState() != null) {
-                    PMDState.getHistoricState().putAll(data);
-                    oos.writeObject(PMDState.getHistoricState());
-                } else {
-                    oos.writeObject(data);
-                }
-                if (Paths.get(f.getParentFile().getAbsolutePath(), "compileState.dat").toFile().exists()) {
-                    Files.copy(Paths.get(f.getParentFile().getAbsolutePath(), "compileState.dat"),
-                            Paths.get(pmdStateFile.getParentFile().getAbsolutePath(), "compile.dat"),
-                            StandardCopyOption.REPLACE_EXISTING);
-                }
-            } catch (IOException e) {
-                throw new UncheckedIOException(e);
-            }
-            return;
-        }
-        if (project.getProperties().containsKey(SKIP_PMD) && Boolean.TRUE.equals(Boolean.valueOf(
-                project.getProperties().getProperty(SKIP_PMD)))) {
-            return;
-        }
-        pmdTargetLocation.getParentFile().mkdirs();
-        try (InputStream is = this.getClass().getResourceAsStream("/pmd-empty.xml");
-             OutputStream os = new FileOutputStream(pmdTargetLocation)) {
-            String text = readInputStream(is);
-            os.write(text.getBytes());
-        } catch (IOException ioe) {
-            throw new UncheckedIOException(ioe);
-        }
-    }
-
-}
diff --git a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/PMDHelperUtils.java b/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/PMDHelperUtils.java
deleted file mode 100644
index 55f6175..0000000
--- a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/PMDHelperUtils.java
+++ /dev/null
@@ -1,243 +0,0 @@
-package org.openecomp.sdc.onboarding.pmd;
-
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.project.MavenProject;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.io.UncheckedIOException;
-import java.nio.file.Files;
-import java.nio.file.StandardOpenOption;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Scanner;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class PMDHelperUtils {
-
-    private PMDHelperUtils() {
-        // default constructor. donot remove.
-    }
-
-    private static Map<String, String> pmdLink = new HashMap<>();
-
-    static {
-        pmdLink.put("one", "errorprone");
-        pmdLink.put("ign", "design");
-        pmdLink.put("ing", "multithreading");
-        pmdLink.put("nce", "performance");
-        pmdLink.put("ity", "security");
-        pmdLink.put("yle", "codestyle");
-        pmdLink.put("ces", "bestpractices");
-    }
-
-    static String readInputStream(InputStream is) {
-        try (Scanner s = new Scanner(is).useDelimiter("\\A")) {
-            return s.hasNext() ? s.next() : "";
-        }
-    }
-
-    static File getStateFile(String moduleCoordinate, MavenProject proj, String filePath) {
-        return new File(getTopParentProject(moduleCoordinate, proj).getBasedir(),
-                filePath.substring(filePath.indexOf('/') + 1));
-    }
-
-    private static MavenProject getTopParentProject(String moduleCoordinate, MavenProject proj) {
-        if (getModuleCoordinate(proj).equals(moduleCoordinate) || proj.getParent() == null) {
-            return proj;
-        } else {
-            return getTopParentProject(moduleCoordinate, proj.getParent());
-        }
-    }
-
-    private static String getModuleCoordinate(MavenProject project) {
-        return project.getGroupId() + ":" + project.getArtifactId();
-    }
-
-    private static <T> T readState(String fileName, Class<T> clazz) {
-        try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName);
-             ObjectInputStream ois = new ObjectInputStream(is)) {
-            return clazz.cast(ois.readObject());
-        } catch (Exception ioe) {
-            return null;
-        }
-    }
-
-    static <T> T readState(File file, Class<T> clazz) {
-        try (InputStream is = new FileInputStream(file); ObjectInputStream ois = new ObjectInputStream(is)) {
-            return clazz.cast(ois.readObject());
-        } catch (Exception ioe) {
-            return null;
-        }
-    }
-
-    static boolean evaluateCodeQuality(Map<String, List<Violation>> stats, Map<String, List<Violation>> current,
-            File file, Log logger) {
-        boolean qualityCheckPassed = true;
-        Map<String, String> table = new HashMap<>();
-        Set<String> classes = current.keySet();
-        int counter = 0;
-        for (String clazz : classes) {
-            List<Violation> orgViolation = stats.get(clazz) == null ? new ArrayList<>() : stats.get(clazz);
-            List<Violation> currViolation = current.get(clazz) == null ? new ArrayList<>() : current.get(clazz);
-            if (diffViolation(orgViolation, currViolation) > 0) {
-                Map<String, Integer> lDetails = diffCategory(orgViolation, currViolation);
-                for (String cat : lDetails.keySet()) {
-                    String lineNo = getLineNumbers(currViolation, cat);
-                    table.put(++counter + clazz, cat + ":" + lDetails.get(cat) + ":" + lineNo);
-                }
-            }
-        }
-        if (!table.isEmpty()) {
-            qualityCheckPassed = false;
-            try {
-                Files.write(file.toPath(),
-                        new Table(getTableHeaders(true), getContents(table, true)).drawTable().getBytes(),
-                        StandardOpenOption.CREATE);
-            } catch (IOException e) {
-                throw new UncheckedIOException(e);
-            }
-            logger.error(new Table(getTableHeaders(false), getContents(table, false)).drawTable());
-        }
-        return qualityCheckPassed;
-    }
-
-    private static ArrayList<String> getTableHeaders(boolean addLink) {
-        ArrayList<String> list = new ArrayList<>();
-        list.add("Class Name");
-        list.add("Rule Category");
-        list.add("Rule Name");
-        list.add("Fix");
-        list.add("Source Line No");
-        if (addLink) {
-            list.add("Help Link");
-        }
-        return list;
-    }
-
-    private static ArrayList<ArrayList<String>> getContents(Map<String, String> data, boolean addLink) {
-        ArrayList<ArrayList<String>> list = new ArrayList<>();
-        Pattern p = Pattern.compile("(.*):(.*):(.*):(.*)");
-        for (String s : data.keySet()) {
-            ArrayList<String> l = new ArrayList<>();
-            l.add(s.substring(s.indexOf("::") + 2));
-            Matcher m = p.matcher(data.get(s));
-            if (m.find()) {
-                l.add(m.group(1));
-                l.add(m.group(2));
-                l.add(m.group(3) + " at least");
-                l.add(m.group(4));
-                if (addLink) {
-                    l.add("http://pmd.sourceforge.net/snapshot/pmd_rules_java_" + getLinkCategory(m.group(1)) + ".html#"
-                                  + m.group(2).toLowerCase());
-                }
-            }
-            list.add(l);
-        }
-        return list;
-    }
-
-    private static String getLinkCategory(String cat) {
-        for (String category : pmdLink.keySet()) {
-            if (cat.contains(category)) {
-                return pmdLink.get(category);
-            }
-        }
-        return "ERROR";
-    }
-
-    private static int diffViolation(List<Violation> org, List<Violation> curr) {
-        int diff = 0;
-        if (org == null || org.isEmpty()) {
-            if (curr != null && !curr.isEmpty()) {
-                diff = curr.size();
-            }
-        } else {
-            if (curr != null && !curr.isEmpty()) {
-                diff = curr.size() - org.size();
-            }
-        }
-        return diff;
-    }
-
-    private static Map<String, Integer> diffCategory(List<Violation> org, List<Violation> curr) {
-        Map<String, AtomicInteger> currData = new HashMap<>();
-        Map<String, AtomicInteger> orgData = new HashMap<>();
-        countViolations(curr, currData);
-        countViolations(org, orgData);
-        Map<String, Integer> val = new HashMap<>();
-        for (String cat : currData.keySet()) {
-            if (orgData.get(cat) == null) {
-                val.put(cat, currData.get(cat).intValue());
-            } else if (currData.get(cat).intValue() > orgData.get(cat).intValue()) {
-                val.put(cat, currData.get(cat).intValue() - orgData.get(cat).intValue());
-            }
-        }
-        return val;
-    }
-
-    private static void countViolations(List<Violation> violations,  Map<String, AtomicInteger> store){
-        for (Violation v : violations) {
-            if (store.get(v.getCategory() + ":" + v.getRule()) == null) {
-                store.put(v.getCategory() + ":" + v.getRule(), new AtomicInteger(1));
-            } else {
-                store.get(v.getCategory() + ":" + v.getRule()).incrementAndGet();
-            }
-        }
-    }
-
-    private static void processOriginalViolations(List<Violation> org){
-
-    }
-    private static String getLineNumbers(List<Violation> vList, String category) {
-        String val = "";
-        boolean firstOver = false;
-        for (Violation v : vList) {
-            if (category.equals(v.getCategory() + ":" + v.getRule())) {
-                if (firstOver) {
-                    val += ",";
-                }
-                val += v.getLine();
-                firstOver = true;
-            }
-        }
-        return val;
-    }
-
-    static Map<String, List<Violation>> readCurrentPMDState(String fileName) {
-        Map<String, List<Violation>> val = readState(fileName, HashMap.class);
-        return val == null ? new HashMap<>() : val;
-    }
-
-    static Map<String, List<Violation>> readCurrentPMDState(File file) {
-        Map<String, List<Violation>> val = readState(file, HashMap.class);
-        return val == null ? new HashMap<>() : val;
-    }
-
-    static void writeCurrentPMDState(File file, Map<String, List<Violation>> data) {
-        try (OutputStream os = new FileOutputStream(file); ObjectOutputStream oos = new ObjectOutputStream(os)) {
-            oos.writeObject(data);
-        } catch (IOException ioe) {
-            throw new UncheckedIOException(ioe);
-        }
-    }
-
-    static boolean isReportEmpty(File reportFile){
-        try {
-            return !reportFile.exists() || Files.readAllLines(reportFile.toPath()).size()<=1;
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-}
diff --git a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/PMDState.java b/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/PMDState.java
deleted file mode 100644
index 2602fff..0000000
--- a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/PMDState.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.openecomp.sdc.onboarding.pmd;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class PMDState {
-
-    private static Map<String, List<Violation>> data = new HashMap<>();
-    private static Map<String, List<Violation>> historicState = null;
-    private static Pattern p =
-            Pattern.compile("\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\"");
-
-    public static boolean addViolation(String line, String fileLocation) {
-        Matcher m = p.matcher(line);
-        if (m.find()) {
-            if (m.group(3).indexOf("generated-sources") != -1) {
-                return true;
-            }
-            String mainOrTest =
-                    m.group(3).indexOf(File.separator + "test" + File.separator) == -1 ? "[MAIN] " : "[TEST] ";
-            List<Violation> list = data.get(fileLocation + "::" + mainOrTest + m.group(2) + "." + m.group(3).substring(
-                    m.group(3).lastIndexOf(File.separatorChar) + 1));
-            if (list == null) {
-                list = new LinkedList<>();
-                data.put(fileLocation + "::" + mainOrTest + m.group(2) + "." + m.group(3).substring(
-                        m.group(3).lastIndexOf(File.separatorChar) + 1), list);
-            }
-
-            list.add(new Violation(m.group(7), m.group(8), m.group(6), Integer.parseInt(m.group(4)),
-                    Integer.parseInt(m.group(5))));
-            return true;
-        }
-        return false;
-    }
-
-    public static void reset(File mainFile, File testFile, String moduleCoordinates) throws IOException {
-        data.clear();
-        init(mainFile, moduleCoordinates, "[MAIN] ");
-        init(testFile, moduleCoordinates, "[TEST] ");
-    }
-
-    private static void init(File file, String moduleCoordinates, String maiOrTest) throws IOException {
-        if (file.exists()) {
-            List<String> coll = Files.readAllLines(file.toPath());
-            for (String line : coll) {
-                if (line.indexOf("$") == -1) {
-                    data.put(moduleCoordinates + "::" + maiOrTest + line.substring(0, line.indexOf('.'))
-                                                                        .replace(File.separator, ".") + ".java",
-                            new LinkedList<>());
-                }
-            }
-        }
-    }
-
-    public static Map<String, List<Violation>> getState() {
-        return data;
-    }
-
-    public static void setHistoricState(Map<String, List<Violation>> data) {
-        historicState = data;
-    }
-
-    public static Map<String, List<Violation>> getHistoricState() {
-        return historicState;
-    }
-
-}
diff --git a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/Table.java b/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/Table.java
deleted file mode 100644
index 68eafd0..0000000
--- a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/Table.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright © 2018 European Support Limited
- *
- * 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 a "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.
- */
-
-package org.openecomp.sdc.onboarding.pmd;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Table {
-
-    private final int TABLEPADDING = 1;
-    private final char SEPERATOR_CHAR = '-';
-
-    private ArrayList<String> headers;
-    private ArrayList<ArrayList<String>> table;
-    private ArrayList<Integer> maxLength;
-
-    public Table(ArrayList<String> headersIn, ArrayList<ArrayList<String>> content) {
-        this.headers = headersIn;
-        this.maxLength = new ArrayList<Integer>();
-        for (int i = 0; i < headers.size(); i++) {
-            maxLength.add(headers.get(i).length());
-        }
-        this.table = content;
-        calcMaxLengthAll();
-    }
-
-    public String drawTable() {
-        StringBuilder sb = new StringBuilder();
-        StringBuilder sbRowSep = new StringBuilder();
-        StringBuffer padder = new StringBuffer();
-        String rowSeperator = "";
-
-        for (int i = 0; i < TABLEPADDING; i++) {
-            padder.append(" ");
-        }
-
-        for (int i = 0; i < maxLength.size(); i++) {
-            sbRowSep.append("|");
-            for (int j = 0; j < maxLength.get(i) + (TABLEPADDING * 2); j++) {
-                sbRowSep.append(SEPERATOR_CHAR);
-            }
-        }
-        sbRowSep.append("|");
-        rowSeperator = sbRowSep.toString();
-
-        sb.append(rowSeperator);
-        sb.append("\n");
-        sb.append("|");
-        for (int i = 0; i < headers.size(); i++) {
-            sb.append(padder);
-            sb.append(headers.get(i));
-            for (int k = 0; k < (maxLength.get(i) - headers.get(i).length()); k++) {
-                sb.append(" ");
-            }
-            sb.append(padder);
-            sb.append("|");
-        }
-        sb.append("\n");
-        sb.append(rowSeperator);
-        sb.append("\n");
-
-        for (int i = 0; i < table.size(); i++) {
-            ArrayList<String> tempRow = table.get(i);
-            sb.append("|");
-            for (int j = 0; j < tempRow.size(); j++) {
-                sb.append(padder);
-                sb.append(tempRow.get(j));
-                for (int k = 0; k < (maxLength.get(j) - tempRow.get(j).length()); k++) {
-                    sb.append(" ");
-                }
-                sb.append(padder);
-                sb.append("|");
-            }
-            sb.append("\n");
-            sb.append(rowSeperator);
-            sb.append("\n");
-        }
-        return sb.toString();
-    }
-
-    private void calcMaxLengthAll() {
-        for (int i = 0; i < table.size(); i++) {
-            List<String> temp = table.get(i);
-            for (int j = 0; j < temp.size(); j++) {
-                if (temp.get(j).length() > maxLength.get(j)) {
-                    maxLength.set(j, temp.get(j).length());
-                }
-            }
-        }
-    }
-
-}
-
diff --git a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/VerifyHelperMojo.java b/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/VerifyHelperMojo.java
deleted file mode 100644
index 0785696..0000000
--- a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/VerifyHelperMojo.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright © 2018 European Support Limited
- *
- * 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 a "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.
- */
-
-package org.openecomp.sdc.onboarding.pmd;
-
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.apache.maven.project.MavenProject;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.UncheckedIOException;
-import java.nio.file.Files;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.*;
-
-@Mojo(name = "post-verify-helper", threadSafe = true, defaultPhase = LifecyclePhase.VERIFY,
-        requiresDependencyResolution = ResolutionScope.NONE)
-public class VerifyHelperMojo extends AbstractMojo {
-
-    private static final String SKIP_PMD = "skipPMD";
-
-    @Parameter(defaultValue = "${project}", readonly = true)
-    private MavenProject project;
-    @Parameter(defaultValue = "${project.artifact.groupId}:${project.artifact.artifactId}")
-    private String moduleCoordinates;
-    @Parameter(defaultValue = "${session}")
-    private MavenSession session;
-    @Parameter
-    private File pmdTargetLocation;
-    @Parameter
-    private File pmdReportFile;
-    @Parameter
-    private File pmdStateFile;
-    @Parameter
-    private String pmdCurrentStateFilePath;
-    @Parameter
-    private String excludePackaging;
-    @Parameter
-    private Boolean validatePMDReport = Boolean.FALSE;
-    @Parameter
-    private String persistingModuleCoordinates;
-    @Parameter
-    private File pmdFailureReportLocation;
-    @Parameter
-    private File compiledFilesList;
-    @Parameter
-    private File compiledTestFilesList;
-
-    private static File pmdCurrentStateFile;
-
-    public void execute() throws MojoExecutionException, MojoFailureException {
-        if (project.getPackaging().equals(excludePackaging)) {
-            return;
-        }
-        init();
-        warnDataIssuesIfAny();
-
-        if (Boolean.FALSE.equals(Boolean.valueOf(project.getProperties().getProperty(SKIP_PMD))) && !isReportEmpty(
-                pmdReportFile)) {
-            Map<String, List<Violation>> data = readCurrentPMDState(pmdCurrentStateFile);
-            Map<String, List<Violation>> cv = readCurrentModulePMDReport();
-            data.putAll(cv);
-            boolean error = false;
-            if (!PMDState.getHistoricState().isEmpty() && !PMDHelperUtils
-                                                                   .evaluateCodeQuality(PMDState.getHistoricState(), cv,
-                                                                           pmdFailureReportLocation, getLog())) {
-                error = true;
-                if (validatePMDReport) {
-                    throw new MojoFailureException(
-                            "PMD Failures encountered. Build halted. For details refer " + pmdFailureReportLocation
-                                                                                                   .getAbsolutePath());
-                } else {
-                    getLog().error(
-                            "\u001B[31m\u001B[1m Code Quality concerns raised by Quality Management System. For details refer "
-                                    + pmdFailureReportLocation.getAbsolutePath()
-                                    + " and address them before committing this code in Version Control System. \u001B[0m");
-                }
-            }
-            String moduleChecksum = project.getProperties().getProperty("mainChecksum") + ":" + project.getProperties()
-                                                                                                       .getProperty(
-                                                                                                               "testChecksum");
-            data = reinitializeIfNeeded(!error, data);
-
-            Map<String, Object> checksumStore = HashMap.class.cast(data);
-            if (!moduleChecksum.equals(checksumStore.get(moduleCoordinates))) {
-                checksumStore.put(moduleCoordinates, moduleChecksum);
-                writeCurrentPMDState(pmdCurrentStateFile, data);
-            }
-        }
-        if (Boolean.FALSE.equals(Boolean.valueOf(project.getProperties().getProperty(SKIP_PMD)))) {
-            if (isReportEmpty(pmdReportFile)) {
-                HashMap data = HashMap.class.cast(readCurrentPMDState(pmdCurrentStateFile));
-                data.put(moduleCoordinates,
-                        project.getProperties().getProperty("mainChecksum") + ":" + project.getProperties().getProperty(
-                                "testChecksum"));
-                writeCurrentPMDState(pmdCurrentStateFile, data);
-            }
-            pmdReportFile.delete();
-        }
-        removeProcessFiles();
-
-    }
-
-    private void removeProcessFiles() {
-        if (moduleCoordinates.equals(persistingModuleCoordinates) && pmdStateFile.exists()) {
-            for (File file : pmdStateFile.getParentFile().listFiles()) {
-                if (file.isFile()) {
-                    file.delete();
-                }
-            }
-        }
-        if (pmdTargetLocation.exists()) {
-            pmdTargetLocation.delete();
-        }
-    }
-
-    private void init() {
-        if (pmdCurrentStateFile == null) {
-            setPmdCurrentStateFile(
-                    getStateFile(pmdCurrentStateFilePath.substring(0, pmdCurrentStateFilePath.indexOf('/')), project,
-                            pmdCurrentStateFilePath));
-
-            pmdReportFile.getParentFile().mkdirs();
-        }
-    }
-
-    private static void setPmdCurrentStateFile(File file) {
-        pmdCurrentStateFile = file;
-        pmdCurrentStateFile.getParentFile().mkdirs();
-    }
-
-    private Map<String, List<Violation>> readCurrentModulePMDReport() {
-        try {
-            PMDState.reset(compiledFilesList, compiledTestFilesList, moduleCoordinates);
-            if (pmdReportFile.exists()) {
-                List<String> lines = Files.readAllLines(pmdReportFile.toPath());
-                lines.remove(0);
-                for (String line : lines) {
-                    PMDState.addViolation(line, moduleCoordinates);
-                }
-            }
-        } catch (IOException ioe) {
-            throw new UncheckedIOException(ioe);
-        }
-        return PMDState.getState();
-    }
-
-    private void warnDataIssuesIfAny() {
-        if (PMDState.getHistoricState() != null && PMDState.getHistoricState().isEmpty()) {
-            getLog().error("PMD Check is skipped. problem while loading data.");
-        }
-    }
-
-    private Map<String, List<Violation>> reinitializeIfNeeded(boolean required, Map<String, List<Violation>> orig) {
-        if (required) {
-            return readCurrentPMDState(pmdCurrentStateFile);
-        } else {
-            return orig;
-        }
-    }
-
-}
diff --git a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/Violation.java b/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/Violation.java
deleted file mode 100644
index b0cafc4..0000000
--- a/openecomp-be/tools/pmd-helper-plugin/src/main/java/org/openecomp/sdc/onboarding/pmd/Violation.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright © 2018 European Support Limited
- *
- * 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 a "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.
- */
-
-package org.openecomp.sdc.onboarding.pmd;
-
-import java.io.Serializable;
-
-public class Violation implements Serializable {
-
-    private final String category;
-    private final String rule;
-    private final String description;
-    private final int priority;
-    private final int line;
-
-    public String getCategory() {
-        return category;
-    }
-
-    public String getRule() {
-        return rule;
-    }
-
-    public int getPriority() {
-        return priority;
-    }
-
-    public int getLine() {
-        return line;
-    }
-
-    public Violation(String category, String rule, String description, int priority, int line) {
-        this.category = category;
-        this.rule = rule;
-        this.description = description;
-        this.priority = priority;
-        this.line = line;
-    }
-
-    public String toString() {
-        return category + ":" + rule + ":" + getPriority() + description + ":" + line;
-    }
-}
diff --git a/openecomp-be/tools/pmd-helper-plugin/src/main/resources/pmd-empty.xml b/openecomp-be/tools/pmd-helper-plugin/src/main/resources/pmd-empty.xml
deleted file mode 100644
index c23b533..0000000
--- a/openecomp-be/tools/pmd-helper-plugin/src/main/resources/pmd-empty.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<pmd xmlns="http://pmd.sourceforge.net/report/2.0.0"
-     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-     xsi:schemaLocation="http://pmd.sourceforge.net/report/2.0.0 http://pmd.sourceforge.net/report_2_0_0.xsd"
-     version="6.0.1" timestamp="2018-04-29T23:06:21.384">
-</pmd>
