blob: 7bafb841df1a5ad5578bfc90431700227cc278f4 [file] [log] [blame]
Yuta HIGUCHI5a016cf2016-12-20 15:19:22 -08001<?xml version="1.0" encoding="UTF-8"?>
2<!--
Brian O'Connor6547c0e2017-08-03 18:48:25 -07003 ~ Copyright 2016 Open Networking Foundation
Yuta HIGUCHI5a016cf2016-12-20 15:19:22 -08004 ~
5 ~ Licensed under the Apache License, Version 2.0 (the "License");
6 ~ you may not use this file except in compliance with the License.
7 ~ You may obtain a copy of the License at
8 ~
9 ~ http://www.apache.org/licenses/LICENSE-2.0
10 ~
11 ~ Unless required by applicable law or agreed to in writing, software
12 ~ distributed under the License is distributed on an "AS IS" BASIS,
13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ~ See the License for the specific language governing permissions and
15 ~ limitations under the License.
16 -->
17<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">
18 <modelVersion>4.0.0</modelVersion>
19
20 <parent>
21 <groupId>org.onosproject</groupId>
22 <artifactId>onos-dependencies</artifactId>
23 <version>1.8.0</version>
24 <relativePath/> <!-- parent is remote -->
25 </parent>
26
27 <groupId>org.onosproject</groupId>
28 <artifactId>mef-nrp-api</artifactId>
29 <version>1.0-SNAPSHOT</version>
30 <packaging>bundle</packaging>
31
32 <description>ONOS MEF NRP API application for Carrier Ethernet app</description>
33 <url>http://onosproject.org</url>
34
35 <properties>
36 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
37 <onos.version>1.8.0</onos.version>
38 <carrierethernet.version>1.8.0-SNAPSHOT</carrierethernet.version>
39 <onos.app.requires>org.onosproject.ecord.carrierethernet</onos.app.requires>
40 <api.version>1.0.0</api.version>
41 <onos.app.name>org.onosproject.mefnrpapi</onos.app.name>
42 <onos.app.title>MEF NRP REST API</onos.app.title>
43 <onos.app.category>default</onos.app.category>
44 <api.description>MEF NRP REST API for Carrier Ethernet app</api.description>
45 <web.context>/onos/mef-nrp-api</web.context>
46 <api.title>MEF NRP REST API</api.title>
47 <onos.app.url>http://onosproject.org</onos.app.url>
48 <api.package>org.onosproject.mefnrpapi</api.package>
49 <onos.app.readme>MEF NRP REST API for Carrier Ethernet app.</onos.app.readme>
50 <!-- Extra properties due to MEF NRP API -->
51 <swagger-core-version>1.5.10</swagger-core-version>
52 <servlet-api-version>2.5</servlet-api-version>
53 <jersey2-version>2.22.2</jersey2-version>
54 <!-- End of extra properties due to MEF NRP API -->
55 </properties>
56
57 <dependencies>
58 <dependency>
59 <groupId>org.onosproject</groupId>
60 <artifactId>onos-api</artifactId>
61 <version>${onos.version}</version>
62 </dependency>
63
64 <dependency>
65 <groupId>org.onosproject</groupId>
66 <artifactId>onlab-osgi</artifactId>
67 <version>${onos.version}</version>
68 </dependency>
69
70 <dependency>
71 <groupId>junit</groupId>
72 <artifactId>junit</artifactId>
73 <scope>test</scope>
74 </dependency>
75
76 <dependency>
77 <groupId>org.onosproject</groupId>
78 <artifactId>onos-api</artifactId>
79 <version>${onos.version}</version>
80 <scope>test</scope>
81 <classifier>tests</classifier>
82 </dependency>
83
84 <dependency>
85 <groupId>org.apache.felix</groupId>
86 <artifactId>org.apache.felix.scr.annotations</artifactId>
87 <scope>provided</scope>
88 </dependency>
89
90 <dependency>
91 <groupId>javax.ws.rs</groupId>
92 <artifactId>javax.ws.rs-api</artifactId>
93 <version>2.0.1</version>
94 <scope>provided</scope>
95 </dependency>
96
97 <dependency>
98 <groupId>com.fasterxml.jackson.core</groupId>
99 <artifactId>jackson-databind</artifactId>
100 <scope>provided</scope>
101 </dependency>
102
103 <dependency>
104 <groupId>org.onosproject</groupId>
105 <artifactId>onos-rest</artifactId>
106 <version>${onos.version}</version>
107 <scope>provided</scope>
108 </dependency>
109
110 <dependency>
111 <groupId>org.apache.karaf.shell</groupId>
112 <artifactId>org.apache.karaf.shell.console</artifactId>
113 <scope>provided</scope>
114 </dependency>
115
116 <dependency>
117 <groupId>com.fasterxml.jackson.core</groupId>
118 <artifactId>jackson-annotations</artifactId>
119 <scope>provided</scope>
120 </dependency>
121
122 <dependency>
123 <groupId>org.onosproject</groupId>
124 <artifactId>onos-cli</artifactId>
125 <version>${onos.version}</version>
126 <scope>provided</scope>
127 </dependency>
128
129 <dependency>
130 <groupId>org.glassfish.jersey.containers</groupId>
131 <artifactId>jersey-container-servlet</artifactId>
132 <scope>provided</scope>
133 </dependency>
134
135 <dependency>
136 <groupId>org.osgi</groupId>
137 <artifactId>org.osgi.core</artifactId>
138 <scope>provided</scope>
139 </dependency>
140
141 <dependency>
142 <groupId>org.onosproject</groupId>
143 <artifactId>onlab-rest</artifactId>
144 <version>${onos.version}</version>
145 <scope>provided</scope>
146 </dependency>
147
148 <dependency>
149 <groupId>org.onosproject</groupId>
150 <artifactId>onos-app-carrierethernet</artifactId>
151 <version>${carrierethernet.version}</version>
152 <scope>provided</scope>
153 </dependency>
154
155 <!-- Extra dependencies due to MEF NRP API code -->
156 <dependency>
157 <groupId>io.swagger</groupId>
158 <artifactId>swagger-jersey2-jaxrs</artifactId>
159 <scope>compile</scope>
160 <version>${swagger-core-version}</version>
161 </dependency>
162 <dependency>
163 <groupId>javax.servlet</groupId>
164 <artifactId>servlet-api</artifactId>
165 <version>${servlet-api-version}</version>
166 </dependency>
167 <dependency>
168 <groupId>org.glassfish.jersey.containers</groupId>
169 <artifactId>jersey-container-servlet-core</artifactId>
170 </dependency>
171 <dependency>
172 <groupId>org.glassfish.jersey.media</groupId>
173 <artifactId>jersey-media-multipart</artifactId>
174 </dependency>
175
176 <!-- End of extra dependencies due to MEF NRP API code -->
177
178 </dependencies>
179
180 <build>
181 <plugins>
182 <plugin>
183 <groupId>org.apache.maven.plugins</groupId>
184 <artifactId>maven-checkstyle-plugin</artifactId>
185 <configuration>
186 <excludes>org/onosproject/mefnrpapi/api/factories/**.java</excludes>
187 </configuration>
188 </plugin>
189 <plugin>
190 <groupId>org.apache.felix</groupId>
191 <artifactId>maven-bundle-plugin</artifactId>
192 <extensions>true</extensions>
193 <configuration>
194 <niceManifest>true</niceManifest>
195 <instructions>
196 <_wab>src/main/webapp/</_wab>
197 <Include-Resource>WEB-INF/classes/apidoc/swagger.json=src/main/resources/nrp.json,
198 {maven-resources}</Include-Resource>
199 <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
200 <Import-Package>
201 *,
202 org.glassfish.jersey.servlet
203 </Import-Package>
204 <Web-ContextPath>${web.context}</Web-ContextPath>
205 </instructions>
206 </configuration>
207 </plugin>
208
209 <plugin>
210 <groupId>org.apache.maven.plugins</groupId>
211 <artifactId>maven-compiler-plugin</artifactId>
212 <configuration>
213 <source>1.8</source>
214 <target>1.8</target>
215 <excludes>
216 <exclude>**/exclude/*.java</exclude>
217 </excludes>
218 </configuration>
219 </plugin>
220
221 <plugin>
222 <groupId>org.apache.felix</groupId>
223 <artifactId>maven-scr-plugin</artifactId>
224 <executions>
225 <execution>
226 <id>generate-scr-srcdescriptor</id>
227 <goals>
228 <goal>scr</goal>
229 </goals>
230 </execution>
231 </executions>
232 <configuration>
233 <scanClasses>true</scanClasses>
234 <supportedProjectTypes>
235 <supportedProjectType>bundle</supportedProjectType>
236 <supportedProjectType>war</supportedProjectType>
237 </supportedProjectTypes>
238 </configuration>
239 </plugin>
240
241 <plugin>
242 <groupId>org.onosproject</groupId>
243 <artifactId>onos-maven-plugin</artifactId>
244 </plugin>
245
246 <plugin>
247 <groupId>io.swagger</groupId>
248 <artifactId>swagger-codegen-maven-plugin</artifactId>
249 <version>2.2.1</version>
250 <executions>
251 <execution>
252 <goals>
253 <goal>generate</goal>
254 </goals>
255 <configuration>
256 <inputSpec>${basedir}/src/main/resources/nrp.json</inputSpec>
257 <language>jaxrs</language>
258 <library>jersey2</library>
259 <!-- will selectively add sourceFolder by build-helper-maven-plugin -->
260 <addCompileSourceRoot>false</addCompileSourceRoot>
261 <output>${project.build.directory}/swagger/</output>
262 <configOptions>
263 <title>MEF NRP REST Application</title>
264 <!-- Don't use java8 date. This adds dependency to jersey1 classes -->
265 <!-- <dateLibrary>java8</dateLibrary> -->
266 <apiPackage>org.onosproject.mefnrpapi.api</apiPackage>
267 <modelPackage>org.onosproject.mefnrpapi.api.model</modelPackage>
268 <!-- workaround for StringUtil package location -->
269 <invokerPackage>org.onosproject.mefnrpapi.api</invokerPackage>
270 <sourceFolder>src/main/java</sourceFolder>
271 <hideGenerationTimestamp>true</hideGenerationTimestamp>
272 <implFolder>impl/main/java/exclude</implFolder>
273 <library>jersey2</library>
274 <!-- Workaround until swagger-code-gen 2.2.2 is released.
275 https://github.com/swagger-api/swagger-codegen/issues/3509
276 -->
277 <additional-properties>jackson=true</additional-properties>
278 </configOptions>
279 <!-- Workaround until swagger-code-gen 2.2.2 is released.
280 https://github.com/swagger-api/swagger-codegen/issues/3509
281 -->
282 <templateDirectory>${basedir}/swaggergen/template</templateDirectory>
283 </configuration>
284 </execution>
285 </executions>
286 </plugin>
287
288 <plugin>
289 <groupId>org.codehaus.mojo</groupId>
290 <artifactId>build-helper-maven-plugin</artifactId>
291 <version>1.11</version>
292 <executions>
293 <execution>
294 <id>add-source</id>
295 <phase>generate-sources</phase>
296 <goals>
297 <goal>add-source</goal>
298 </goals>
299 <configuration>
300 <sources>
301 <!-- only import generated sourceFolder -->
302 <source>${project.build.directory}/swagger/src/main/java</source>
303 </sources>
304 </configuration>
305 </execution>
306 </executions>
307 </plugin>
308
309 </plugins>
310 </build>
311
312</project>