Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Parents pom distribution"
[controller.git]
/
opendaylight
/
sal
/
yang-prototype
/
code-generator
/
maven-yang-plugin
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
yang2sources
/
plugin
/
YangToSourcesProcessor.java
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 770eeee964895bd0714cdc00eb0e08d7850923cf..a7b7f429ccbffbd9bf4f4593094989446914105f 100644
(file)
--- 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
@@
-40,6
+40,7
@@
class YangToSourcesProcessor {
static final String LOG_PREFIX = "yang-to-sources:";
static final String META_INF_YANG_STRING = "META-INF" + File.separator
+ "yang";
static final String LOG_PREFIX = "yang-to-sources:";
static final String META_INF_YANG_STRING = "META-INF" + File.separator
+ "yang";
+ static final String META_INF_YANG_STRING_JAR = "META-INF" + "/" + "yang";
static final File META_INF_YANG_DIR = new File(META_INF_YANG_STRING);
private final Log log;
static final File META_INF_YANG_DIR = new File(META_INF_YANG_STRING);
private final Log log;
@@
-51,8
+52,8
@@
class YangToSourcesProcessor {
@VisibleForTesting
YangToSourcesProcessor(Log log, File yangFilesRootDir,
@VisibleForTesting
YangToSourcesProcessor(Log log, File yangFilesRootDir,
- List<CodeGeneratorArg> codeGenerators, MavenProject project,
- boolean inspectDependencies, YangProvider yangProvider) {
+
List<CodeGeneratorArg> codeGenerators, MavenProject project,
+
boolean inspectDependencies, YangProvider yangProvider) {
this.log = Util.checkNotNull(log, "log");
this.yangFilesRootDir = Util.checkNotNull(yangFilesRootDir,
"yangFilesRootDir");
this.log = Util.checkNotNull(log, "log");
this.yangFilesRootDir = Util.checkNotNull(yangFilesRootDir,
"yangFilesRootDir");
@@
-64,8
+65,8
@@
class YangToSourcesProcessor {
}
YangToSourcesProcessor(Log log, File yangFilesRootDir,
}
YangToSourcesProcessor(Log log, File yangFilesRootDir,
- List<CodeGeneratorArg> codeGenerators, MavenProject project,
- boolean inspectDependencies) {
+
List<CodeGeneratorArg> codeGenerators, MavenProject project,
+
boolean inspectDependencies) {
this(log, yangFilesRootDir, codeGenerators, project,
inspectDependencies, new YangProvider());
}
this(log, yangFilesRootDir, codeGenerators, project,
inspectDependencies, new YangProvider());
}
@@
-132,7
+133,7
@@
class YangToSourcesProcessor {
+ "yang";
void addYangsToMETA_INF(Log log, MavenProject project,
+ "yang";
void addYangsToMETA_INF(Log log, MavenProject project,
- File yangFilesRootDir) throws MojoFailureException {
+
File yangFilesRootDir) throws MojoFailureException {
File targetYangDir = new File(project.getBasedir(), yangResourceDir);
try {
File targetYangDir = new File(project.getBasedir(), yangResourceDir);
try {
@@
-151,7
+152,7
@@
class YangToSourcesProcessor {
}
private static void setResource(File targetYangDir, String targetPath,
}
private static void setResource(File targetYangDir, String targetPath,
- MavenProject project) {
+
MavenProject project) {
Resource res = new Resource();
res.setDirectory(targetYangDir.getPath());
if (targetPath != null)
Resource res = new Resource();
res.setDirectory(targetYangDir.getPath());
if (targetPath != null)
@@
-198,7
+199,7
@@
class YangToSourcesProcessor {
* Instantiate generator from class and call required method
*/
private void generateSourcesWithOneGenerator(ContextHolder context,
* Instantiate generator from class and call required method
*/
private void generateSourcesWithOneGenerator(ContextHolder context,
- CodeGeneratorArg codeGeneratorCfg) throws ClassNotFoundException,
+
CodeGeneratorArg codeGeneratorCfg) throws ClassNotFoundException,
InstantiationException, IllegalAccessException, IOException {
codeGeneratorCfg.check();
InstantiationException, IllegalAccessException, IOException {
codeGeneratorCfg.check();