defect fix

Change-Id: I5742b1c3ef8fcfd4da8543191df95aa4a9e35bd9
diff --git a/compiler/base/tool/src/main/java/org/onosproject/yang/compiler/base/tool/YangToolManager.java b/compiler/base/tool/src/main/java/org/onosproject/yang/compiler/base/tool/YangToolManager.java
index 548511d..d4992cb 100644
--- a/compiler/base/tool/src/main/java/org/onosproject/yang/compiler/base/tool/YangToolManager.java
+++ b/compiler/base/tool/src/main/java/org/onosproject/yang/compiler/base/tool/YangToolManager.java
@@ -303,8 +303,8 @@
         yangNodeSortedList.addAll(yangNodeSet);
         sort(yangNodeSortedList);
         for (YangNode node : yangNodeSortedList) {
-            if (node.isToTranslate() && !(!((YangDeviationHolder) node)
-                    .isModuleForDeviation())) {
+            if (node.isToTranslate() && !((YangDeviationHolder) node)
+                    .isModuleForDeviation()) {
                 generateJavaCode(node, pluginConfig);
             }
         }
diff --git a/compiler/plugin/maven/src/main/java/org/onosproject/yang/compiler/plugin/maven/YangPluginUtils.java b/compiler/plugin/maven/src/main/java/org/onosproject/yang/compiler/plugin/maven/YangPluginUtils.java
index c5f0e69..1a43f6c 100644
--- a/compiler/plugin/maven/src/main/java/org/onosproject/yang/compiler/plugin/maven/YangPluginUtils.java
+++ b/compiler/plugin/maven/src/main/java/org/onosproject/yang/compiler/plugin/maven/YangPluginUtils.java
@@ -18,7 +18,6 @@
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Plugin;
 import org.apache.maven.model.Resource;
 import org.apache.maven.project.MavenProject;
 import org.onosproject.yang.compiler.base.tool.YangToolManager;
@@ -30,13 +29,9 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.io.PrintWriter;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
-import static org.onosproject.yang.compiler.utils.UtilConstants.COLON;
-import static org.onosproject.yang.compiler.utils.UtilConstants.EMPTY_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.HYPHEN;
 import static org.onosproject.yang.compiler.utils.UtilConstants.JAR;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PERIOD;
@@ -51,10 +46,6 @@
 
     private static final Logger log = getLogger(YangPluginUtils.class);
 
-    private static final String TEXT_FILE_EXTENSION = ".txt";
-    private static final String VERSION_META_DATA = "VersionMetaData";
-    private static final String PLUGIN_ARTIFACT = "onos-yang-maven-plugin";
-
     private YangPluginUtils() {
     }
 
@@ -80,7 +71,6 @@
      */
     static void copyYangFilesToTarget(String outputDir, MavenProject project)
             throws IOException {
-
         addToProjectResource(outputDir + SLASH + TEMP + SLASH, project);
     }
 
@@ -104,39 +94,6 @@
         if (operation) {
             addToProjectResource(directory + SLASH + TEMP + SLASH, project);
         }
-
-        if (operation) {
-            addVersionMetaDataFile(project, serFileDirPath);
-        }
-    }
-
-    /**
-     * Adds version meta data files for YSR to know version of YANG tools.
-     *
-     * @param project maven project
-     * @param dir     directory
-     * @throws IOException when fails to do IO operations
-     */
-    private static void addVersionMetaDataFile(MavenProject project, String dir)
-            throws IOException {
-        List<Plugin> plugins = project.getBuildPlugins();
-        Iterator<Plugin> it = plugins.iterator();
-        Plugin plugin = it.next();
-        String data = EMPTY_STRING;
-        while (it.hasNext()) {
-            if (plugin.getArtifactId().equals(PLUGIN_ARTIFACT)) {
-                data = plugin.getGroupId() + COLON + plugin.getArtifactId()
-                        + COLON + plugin.getVersion();
-            }
-            plugin = it.next();
-        }
-        if (data.equals(EMPTY_STRING)) {
-            throw new IOException("Invalid artifact for " + PLUGIN_ARTIFACT);
-        }
-        String verFileName = dir + VERSION_META_DATA + TEXT_FILE_EXTENSION;
-        PrintWriter out = new PrintWriter(verFileName);
-        out.print(data);
-        out.close();
     }
 
     /**