X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fcode-generator%2Fmaven-yang-plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fyang2sources%2Fplugin%2FYangToSourcesProcessor.java;h=b781d72311e19a8a9372ce49c64fa9e254ef9827;hb=refs%2Fchanges%2F78%2F578%2F1;hp=a7b7f429ccbffbd9bf4f4593094989446914105f;hpb=12f5f66b1285e10bd9fd05c443651173cae02c3f;p=controller.git 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..b781d72311 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, @@ -220,7 +220,9 @@ class YangToSourcesProcessor { codeGeneratorCfg.getCodeGeneratorClass(), codeGeneratorCfg.getAdditionalConfiguration())); - project.addCompileSourceRoot(outputDir.getAbsolutePath()); + if(outputDir != null) { + project.addCompileSourceRoot(outputDir.getAbsolutePath()); + } g.setLog(log); g.setMavenProject(project); g.setAdditionalConfig(codeGeneratorCfg.getAdditionalConfiguration());