From: Maros Marsalek Date: Mon, 8 Jul 2013 10:41:32 +0000 (+0200) Subject: Fixed bug in maven-yang-plugin. X-Git-Tag: releasepom-0.1.0~305^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=8fc279ab14ec5139777e4a0a76ef72bc4d8429cd;hp=4239f8a44249dfa006418475d1680dc8323084ba Fixed bug in maven-yang-plugin. Yang files in dependencies were not located properly on windows os. Signed-off-by: Maros Marsalek --- diff --git a/opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/java/org/opendaylight/controller/yang2sources/plugin/it/YangToSourcesPluginTestIT.java b/opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/java/org/opendaylight/controller/yang2sources/plugin/it/YangToSourcesPluginTestIT.java index 9532d4efc9..bbece72fd3 100644 --- a/opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/java/org/opendaylight/controller/yang2sources/plugin/it/YangToSourcesPluginTestIT.java +++ b/opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin-it/src/test/java/org/opendaylight/controller/yang2sources/plugin/it/YangToSourcesPluginTestIT.java @@ -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"); diff --git a/opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin/src/main/java/org/opendaylight/controller/yang2sources/plugin/YangToSourcesProcessor.java b/opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin/src/main/java/org/opendaylight/controller/yang2sources/plugin/YangToSourcesProcessor.java index a7b7f429cc..cc7c536342 100644 --- a/opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin/src/main/java/org/opendaylight/controller/yang2sources/plugin/YangToSourcesProcessor.java +++ b/opendaylight/sal/yang-prototype/code-generator/maven-yang-plugin/src/main/java/org/opendaylight/controller/yang2sources/plugin/YangToSourcesProcessor.java @@ -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,