Updates for ODL Neon
[ccsdk/distribution.git] / dgbuilder / build_pom_for_yang_compile
1 echo "Version of dgbuilder pom is : $4"
2 echo "Building pom.xml_base for compiling yang"
3
4 model_pom_content=$(cat <<EOF
5 <?xml version="1.0" encoding="UTF-8"?>
6 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
7         <modelVersion>4.0.0</modelVersion>
8         <parent>
9         <groupId>org.onap.ccsdk.sli.core</groupId>
10         <artifactId>ccsdk-sli-core</artifactId>
11         <version>LATEST</version>
12         </parent>
13         <artifactId>yangApp-model</artifactId>
14         <packaging>bundle</packaging>
15     <version>1.0.0-SNAPSHOT</version>
16
17         <build>
18                 <plugins>
19                         <plugin>
20                                 <groupId>org.apache.felix</groupId>
21                                 <artifactId>maven-bundle-plugin</artifactId>
22                                 <extensions>true</extensions>
23                                 <configuration>
24                                         <instructions>
25                                                 <Import-Package>*</Import-Package>
26                                         </instructions>
27                                 </configuration>
28                         </plugin>
29                         <plugin>
30                                 <groupId>org.opendaylight.yangtools</groupId>
31                                 <artifactId>yang-maven-plugin</artifactId>
32                                 <version>\${odl.yangtools.yang.maven.plugin.version}</version>
33                                 <dependencies>
34                                         <dependency>
35                                                 <groupId>org.opendaylight.mdsal</groupId>
36                                                 <artifactId>maven-sal-api-gen-plugin</artifactId>
37                                                 <version>\${odl.sal.api.gen.plugin.version}</version>
38                                                 <type>jar</type>
39                                         </dependency>
40                                 </dependencies>
41                                 <executions>
42                                         <execution>
43                                                 <goals>
44                                                         <goal>generate-sources</goal>
45                                                 </goals>
46                                                 <configuration>
47                                                         <yangFilesRootDir>\${yang.file.directory}</yangFilesRootDir>
48                                                         <codeGenerators>
49                                                                 <generator>
50                                                                         <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
51                                                                         <outputBaseDir>\${salGeneratorPath}</outputBaseDir>
52                                                                 </generator>
53                                                         </codeGenerators>
54                                                         <inspectDependencies>true</inspectDependencies>
55                                                 </configuration>
56                                         </execution>
57                                 </executions>
58                         </plugin>
59                 </plugins>
60         </build>
61         <dependencies>
62                 <dependency>
63                         <groupId>org.opendaylight.mdsal</groupId>
64                         <artifactId>yang-binding</artifactId>
65                         <version>\${odl.mdsal.yang.binding.version}</version>
66                 </dependency>
67                 <dependency>
68                         <groupId>org.opendaylight.yangtools</groupId>
69                         <artifactId>yang-common</artifactId>
70                         <version>\${odl.yangtools.version}</version>
71                 </dependency>
72                 <dependency>
73                         <groupId>org.opendaylight.mdsal.model</groupId>
74                         <artifactId>ietf-inet-types</artifactId>
75                         <version>\${odl.ietf-inet-types.version}</version>
76                 </dependency>
77                 <dependency>
78                         <groupId>org.opendaylight.mdsal.model</groupId>
79                         <artifactId>ietf-yang-types</artifactId>
80                         <version>\${odl.ietf-yang-types.version}</version>
81                 </dependency>
82         </dependencies>
83 </project>
84 EOF
85 )
86 echo "$model_pom_content" >tools/pom.xml_base

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use