faf463acad0a8dca27c08f4062221394eee2e706
[openflowjava.git] / openflow-protocol-api / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3     <modelVersion>4.0.0</modelVersion>
4     <parent>
5         <groupId>org.opendaylight.openflowjava</groupId>
6         <artifactId>openflow-protocol-parent</artifactId>
7         <version>0.6.0-SNAPSHOT</version>
8     </parent>
9     <artifactId>openflow-protocol-api</artifactId>
10     <packaging>bundle</packaging>
11     <name>Openflow Protocol Library - API</name>
12     <scm>
13         <url>https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main</url>
14         <tag>HEAD</tag>
15     </scm>
16
17     <build>
18         <plugins>
19             <plugin>
20                 <groupId>org.opendaylight.yangtools</groupId>
21                 <artifactId>yang-maven-plugin</artifactId>
22                 <executions>
23                     <execution>
24                         <goals>
25                             <goal>generate-sources</goal>
26                         </goals>
27                         <configuration>
28                             <yangFilesRootDir>src/main/yang</yangFilesRootDir>
29                             <codeGenerators>
30                                 <generator>
31                                     <codeGeneratorClass>
32                                         org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
33                                     </codeGeneratorClass>
34                                     <outputBaseDir>
35                                         ${salGeneratorPath}
36                                     </outputBaseDir>
37                                 </generator>
38                                 <generator>
39                                     <codeGeneratorClass>org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
40                                     <outputBaseDir>target/site/restconf</outputBaseDir>
41                                 </generator>
42                             </codeGenerators>
43                             <inspectDependencies>true</inspectDependencies>
44                         </configuration>
45                     </execution>
46                 </executions>
47
48                 <dependencies>
49                     <dependency>
50                         <groupId>org.opendaylight.yangtools</groupId>
51                         <artifactId>maven-sal-api-gen-plugin</artifactId>
52                         <version>${yangtools.version}</version>
53                         <type>jar</type>
54                     </dependency>
55                 </dependencies>
56             </plugin>
57
58             <!-- TODO: maven-antrun-plugin deletes yang source files from target.
59                        This is done because otherwise openflowjava models are stored in controller
60                        and exposed for further use - which is not desired.
61                        (https://bugs.opendaylight.org/show_bug.cgi?id=2926)
62
63                        This plugin should be removed after relevant configuration is added into 
64                        yang-maven-plugin - which is supposed to happen in BERYLLIUM release -->
65             <plugin>
66                 <groupId>org.apache.maven.plugins</groupId>
67                 <artifactId>maven-antrun-plugin</artifactId>
68                 <version>1.7</version>
69                 <executions>
70                     <execution>
71                         <phase>prepare-package</phase>
72                         <goals>
73                             <goal>run</goal>
74                         </goals>
75                         <configuration>
76                             <tasks>
77                                 <delete>
78                                     <fileset dir="${project.build.directory}/classes/META-INF/yang">
79                                         <include name="*.yang"/>
80                                         <exclude name="openflow-types.yang"/>
81                                         <exclude name="openflow-extensible-match.yang"/>
82                                         <exclude name="openflow-action.yang"/>
83                                         <exclude name="openflow-configuration.yang"/>
84                                     </fileset>
85                                     <fileset dir="${project.build.directory}/generated-sources/yang/META-INF/yang">
86                                         <include name="*.yang"/>
87                                         <exclude name="openflow-types.yang"/>
88                                         <exclude name="openflow-extensible-match.yang"/>
89                                         <exclude name="openflow-action.yang"/>
90                                         <exclude name="openflow-configuration.yang"/>
91                                     </fileset>
92                                 </delete>
93                             </tasks>
94                         </configuration>
95                     </execution>
96                 </executions>
97             </plugin>
98         </plugins>
99         <pluginManagement>
100             <plugins>
101                 <!--This plugin's configuration is used to store Eclipse 
102                     m2e settings only. It has no influence on the Maven build itself. -->
103                 <plugin>
104                     <groupId>org.eclipse.m2e</groupId>
105                     <artifactId>lifecycle-mapping</artifactId>
106                     <version>1.0.0</version>
107                     <configuration>
108                         <lifecycleMappingMetadata>
109                             <pluginExecutions>
110                                 <pluginExecution>
111                                     <pluginExecutionFilter>
112                                         <groupId>
113                                             org.opendaylight.yangtools
114                                         </groupId>
115                                         <artifactId>
116                                             yang-maven-plugin
117                                         </artifactId>
118                                         <versionRange>
119                                             (0.5.6,)
120                                         </versionRange>
121                                         <goals>
122                                             <goal>
123                                                 generate-sources
124                                             </goal>
125                                         </goals>
126                                     </pluginExecutionFilter>
127                                     <action>
128                                         <ignore />
129                                     </action>
130                                 </pluginExecution>
131                             </pluginExecutions>
132                         </lifecycleMappingMetadata>
133                     </configuration>
134                 </plugin>
135             </plugins>
136         </pluginManagement>
137     </build>
138     <dependencies>
139         <dependency>
140             <groupId>org.opendaylight.yangtools</groupId>
141             <artifactId>yang-binding</artifactId>
142         </dependency>
143         <dependency>
144             <groupId>org.opendaylight.yangtools</groupId>
145             <artifactId>yang-common</artifactId>
146         </dependency>
147         <dependency>
148             <groupId>org.opendaylight.yangtools.model</groupId>
149             <artifactId>ietf-inet-types</artifactId>
150         </dependency>
151         <dependency>
152             <groupId>org.opendaylight.yangtools.model</groupId>
153             <artifactId>ietf-yang-types</artifactId>
154         </dependency>
155         <dependency>
156             <groupId>org.opendaylight.yangtools.model</groupId>
157             <artifactId>yang-ext</artifactId>
158         </dependency>
159         <dependency>
160             <groupId>io.netty</groupId>
161             <artifactId>netty-buffer</artifactId>
162         </dependency>
163         <dependency>
164             <groupId>junit</groupId>
165             <artifactId>junit</artifactId>
166             <scope>test</scope>
167         </dependency>
168         <dependency>
169             <groupId>org.mockito</groupId>
170             <artifactId>mockito-all</artifactId>
171         </dependency>
172     </dependencies>
173 </project>