Fixed bug in maven-yang-plugin. 73/573/1
authorMaros Marsalek <mmarsale@cisco.com>
Mon, 8 Jul 2013 10:41:32 +0000 (12:41 +0200)
committerMaros Marsalek <mmarsale@cisco.com>
Mon, 8 Jul 2013 10:41:32 +0000 (12:41 +0200)
Yang files in dependencies were not located properly on windows os.

Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/java/org/opendaylight/controller/yang2sources/plugin/it/YangToSourcesPluginTestIT.java
opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin/src/main/java/org/opendaylight/controller/yang2sources/plugin/YangToSourcesProcessor.java

index 9532d4efc9f92a4fbabe32e6ab11b79665e81e37..bbece72fd32ce54b69bba5c757c00e5aeb31e285 100644 (file)
@@ -49,8 +49,7 @@ public class YangToSourcesPluginTestIT {
         v.verifyTextInLog("[DEBUG] yang-to-sources: Additional configuration picked up for : org.opendaylight.controller.yang2sources.spi.CodeGeneratorTestImpl: {nm1=abcd=a.b.c.d, nm2=abcd2=a.b.c.d.2}");
         v.verifyTextInLog("[DEBUG] yang-to-sources: Additional configuration picked up for : org.opendaylight.controller.yang2sources.spi.CodeGeneratorTestImpl: {c1=config}");
         v.verifyTextInLog(File.separator
-                + "files marked as resources: META-INF" + File.separator
-                + "yang");
+                + "files marked as resources: META-INF/yang");
         v.verifyTextInLog("target"
                 + File.separator
                 + "generated-resources marked as resources for generator: org.opendaylight.controller.yang2sources.spi.CodeGeneratorTestImpl");
index a7b7f429ccbffbd9bf4f4593094989446914105f..cc7c5363422546ca727affb756c82d6a61c8cb0f 100644 (file)
@@ -144,11 +144,11 @@ class YangToSourcesProcessor {
                 throw new MojoFailureException(message, e);
             }
 
-            setResource(targetYangDir, META_INF_YANG_DIR.getPath(), project);
+            setResource(targetYangDir, META_INF_YANG_STRING_JAR, project);
 
             log.debug(Util.message(
                     "Yang files from: %s marked as resources: %s", LOG_PREFIX,
-                    yangFilesRootDir, META_INF_YANG_DIR.getPath()));
+                    yangFilesRootDir, META_INF_YANG_STRING_JAR));
         }
 
         private static void setResource(File targetYangDir, String targetPath,