Added skeleton for yang maven plugin. 11/111/2
authorMaros Marsalek <mmarsale@cisco.com>
Fri, 5 Apr 2013 12:03:55 +0000 (14:03 +0200)
committerMaros Marsalek <mmarsale@cisco.com>
Fri, 5 Apr 2013 13:08:53 +0000 (15:08 +0200)
commitece17d743438390fb4d0d41ea9dec6715ef604fe
tree8701b713dd56815eb6bebbd5429968860fa69d85
parent0cc147bcc963544380071b7d101ece8bbea55849
Added skeleton for yang maven plugin.

Added implementation of yang-to-sources maven plugin
which is responsible for parsing YANG files and invoking
configured code providers to generate sources from YANG
during maven generate-sources and generate-resources phase.

Added JUNIT tests testing the integration with maven and
following scenarios:

No generators for generate-sources and generate-resources
Unknown generators for generate-sources and generate-resources
Non-existant root folder with yang sources
No yang sources under yang root folder
Correct configuration for both generate-sources and generate-resources

Change-Id: Ib4d2a2c004ba19d3fda79d6a3d6da41050059ce0
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
31 files changed:
opendaylight/sal/yang-prototype/code-generator/pom.xml
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/.gitignore [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/java/org/opendaylight/controller/yang2sources/plugin/it/CombineTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/java/org/opendaylight/controller/yang2sources/plugin/it/YangToResourcesPluginTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/java/org/opendaylight/controller/yang2sources/plugin/it/YangToSourcesPluginTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/Correct/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/Correct/resources/model/testfile1.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/Correct/resources/model/testfile2.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/Correct_combined/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/Correct_resources/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/NoGenerators/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/NoGenerators_resources/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/NoYangFiles/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/UnknownGenerator/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/UnknownGenerator_resources/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin-it/src/test/resources/YangRootNotExist/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin/src/main/java/org/opendaylight/controller/yang2sources/plugin/ConfigArg.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin/src/main/java/org/opendaylight/controller/yang2sources/plugin/Util.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin/src/main/java/org/opendaylight/controller/yang2sources/plugin/YangToResourcesMojo.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin/src/main/java/org/opendaylight/controller/yang2sources/plugin/YangToSourcesMojo.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin/src/test/java/org/opendaylight/controller/yang2sources/plugin/GenerateResourcesTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin/src/test/java/org/opendaylight/controller/yang2sources/plugin/GenerateSourcesTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin/src/test/java/org/opendaylight/controller/yang2sources/plugin/UtilTest.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources-plugin/src/test/resources/mock.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources/pom.xml [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources/src/main/java/org/opendaylight/controller/yang2sources/spi/CodeGenerator.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources/src/main/java/org/opendaylight/controller/yang2sources/spi/ResourceGenerator.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources/src/test/java/org/opendaylight/controller/yang2sources/spi/CodeGeneratorTestImpl.java [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/yang-to-sources/src/test/java/org/opendaylight/controller/yang2sources/spi/ResourceProviderTestImpl.java [new file with mode: 0644]