From 5b593496b8f1b8e8be8d7d2dbcc223332e65a49b Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 29 Jul 2018 16:13:45 +0300 Subject: re base code Change-Id: I12a5ca14a6d8a87e9316b9ff362eb131105f98a5 Issue-ID: SDC-1566 Signed-off-by: Michael Lando --- .../onboarding/pmd/InitializationHelperMojo.java | 21 ++++++++++----------- .../sdc/onboarding/pmd/PMDHelperUtils.java | 5 +++-- .../sdc/onboarding/pmd/VerifyHelperMojo.java | 22 ++++++++++------------ .../openecomp/sdc/onboarding/pmd/Violation.java | 4 ---- 4 files changed, 23 insertions(+), 29 deletions(-) (limited to 'openecomp-be/tools/pmd-helper-plugin/src/main/java/org') 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 index 4102a1b382..5b4d5fd131 100644 --- 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 @@ -16,9 +16,14 @@ package org.openecomp.sdc.onboarding.pmd; -import static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.getStateFile; -import static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.readCurrentPMDState; -import static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.readInputStream; +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; @@ -32,14 +37,8 @@ import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.util.List; import java.util.Map; -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 static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.*; @Mojo(name = "init-pmd-helper", threadSafe = true, defaultPhase = LifecyclePhase.PREPARE_PACKAGE, requiresDependencyResolution = ResolutionScope.NONE) 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 index 38dde12454..55f6175184 100644 --- 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 @@ -1,5 +1,8 @@ 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; @@ -20,8 +23,6 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.maven.plugin.logging.Log; -import org.apache.maven.project.MavenProject; public class PMDHelperUtils { 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 index 9e783d9ed4..0785696ca0 100644 --- 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 @@ -16,18 +16,6 @@ package org.openecomp.sdc.onboarding.pmd; -import static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.getStateFile; -import static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.isReportEmpty; -import static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.readCurrentPMDState; -import static org.openecomp.sdc.onboarding.pmd.PMDHelperUtils.writeCurrentPMDState; - -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 org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; @@ -38,6 +26,16 @@ 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 { 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 index 4bfbee18b9..b0cafc474f 100644 --- 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 @@ -16,11 +16,7 @@ package org.openecomp.sdc.onboarding.pmd; -import java.io.File; import java.io.Serializable; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; public class Violation implements Serializable { -- cgit 1.2.3-korg