Merge "Do not create the operational/configuration cache if it already exists"
[controller.git] / opendaylight / northbound / java-client / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3   <modelVersion>4.0.0</modelVersion>
4   <parent>
5     <groupId>org.opendaylight.controller</groupId>
6     <artifactId>commons.opendaylight</artifactId>
7     <version>1.4.1-SNAPSHOT</version>
8     <relativePath>../../commons/opendaylight</relativePath>
9   </parent>
10   <scm>
11     <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
12     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
13     <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
14     <tag>HEAD</tag>
15   </scm>
16
17   <artifactId>northbound.client</artifactId>
18   <version>0.0.1-SNAPSHOT</version>
19   <packaging>pom</packaging>
20
21   <properties>
22     <docs.output.dir>${project.build.directory}/rest-api-docs</docs.output.dir>
23     <java-client>${project.build.directory}/enunciate/build/java-client/full-client.jar</java-client>
24     <java-client-sources>${project.build.directory}/enunciate/build/java-client/full-client-sources.jar</java-client-sources>
25     <json-client>${project.build.directory}/enunciate/build/java-client/full-json-client.jar</json-client>
26     <json-client-sources>${project.build.directory}/enunciate/build/java-client/full-json-client-sources.jar</json-client-sources>
27   </properties>
28
29   <build>
30     <plugins>
31       <plugin>
32         <groupId>org.codehaus.enunciate</groupId>
33         <artifactId>maven-enunciate-plugin</artifactId>
34         <version>${enunciate.version}</version>
35       </plugin>
36
37       <plugin>
38         <groupId>org.apache.maven.plugins</groupId>
39         <artifactId>maven-antrun-plugin</artifactId>
40         <version>1.5</version>
41         <executions>
42           <execution>
43             <phase>install</phase>
44             <goals>
45                 <goal>run</goal>
46             </goals>
47           </execution>
48         </executions>
49         <configuration>
50           <target>
51             <taskdef resource="net/sf/antcontrib/antcontrib.properties"
52                      classpathref="maven.plugin.classpath" />
53             <patternset id="rest.paths">
54               <include name="**/target/site/wsdocs/**"/>
55               <exclude name="**/java-client/**"/>
56             </patternset>
57
58             <echo message="======== Assembling enunciate docs ========"/>
59             <!-- cleanup existing generated files -->
60             <delete dir="${docs.output.dir}"/>
61             <delete file="${docs.output.dir}.zip"/>
62             <mkdir dir="${docs.output.dir}"/>
63             <!-- copy enunciate docs to stage -->
64             <copy todir="${docs.output.dir}">
65               <fileset dir="${basedir}/../../..">
66                 <patternset refid="rest.paths"/>
67               </fileset>
68               <mapper type="regexp"
69                       from="^(.*)/([^/]+)/target/site/wsdocs/(.*)$$"
70                       to="\2/\3"/>
71             </copy>
72             <!-- generate index.html -->
73             <!-- append header -->
74             <echo file="${docs.output.dir}/index.html" append="true">
75 &lt;![CDATA[
76 &lt;html&gt;
77   &lt;head&gt;
78     &lt;title&gt; OpenDaylight REST API Documentation &lt;/title&gt;
79   &lt;/head&gt;
80   &lt;body&gt;
81   &lt;h2&gt;OpenDaylight REST API Documentation&lt;/h2&gt;
82   &lt;p&gt; OpenDaylight supports the following &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer"&gt;Representational State Transfer (REST)&lt;/a&gt; APIs: &lt;/p&gt;
83   &lt;h4&gt;
84 ]]&gt;
85             </echo>
86             <dirset id="nbset" dir="${docs.output.dir}">
87               <include name="*"/>
88             </dirset>
89             <pathconvert pathsep="&amp;#36;{line.separator}"
90                          property="nbs"
91                          refid="nbset"/>
92             <echo file="${docs.output.dir}/index.html"
93                   append="true"
94                   message="${nbs}"/>
95             <replaceregexp file="${docs.output.dir}/index.html"
96                            match="^\${docs.output.dir}/(.*)$"
97                            replace="&amp;lt;li&amp;gt;&amp;lt;a href=\1/index.html&amp;gt; \1 &amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;"
98                            byline="true"/>
99
100             <!-- append footer -->
101             <echo file="${docs.output.dir}/index.html" append="true">
102 &lt;![CDATA[
103   &lt;/h4&gt;
104   &lt;i&gt;---&lt;/i&gt;
105   &lt;/body&gt;
106 &lt;/html&gt;
107 ]]&gt;
108             </echo>
109             <!-- archive all the docs excluding whatever is not needed -->
110             <echo message="======== Archiving enunciate docs ========"/>
111             <zip destfile="${docs.output.dir}.zip">
112               <zipfileset dir="${docs.output.dir}"/>
113             </zip>
114
115             <echo message="======== Build successful ========"/>
116             <echo message="REST docs archive: ${docs.output.dir}.zip"/>
117           </target>
118         </configuration>
119         <dependencies>
120           <dependency>
121             <groupId>ant-contrib</groupId>
122             <artifactId>ant-contrib</artifactId>
123             <version>20020829</version>
124           </dependency>
125         </dependencies>
126       </plugin>
127
128       <plugin>
129         <groupId>org.apache.maven.plugins</groupId>
130         <artifactId>maven-install-plugin</artifactId>
131         <version>2.5</version>
132         <configuration>
133           <packaging>jar</packaging>
134           <groupId>${project.groupId}</groupId>
135           <version>${project.version}</version>
136         </configuration>
137         <executions>
138           <execution>
139             <!-- skip default install -->
140             <id>default-install</id>
141             <phase>install</phase>
142             <goals>
143               <goal>install</goal>
144             </goals>
145             <configuration>
146               <skip>true</skip>
147             </configuration>
148           </execution>
149           <execution>
150             <!-- install full java client -->
151             <id>install-full-client</id>
152             <phase>install</phase>
153             <goals>
154               <goal>install-file</goal>
155             </goals>
156             <configuration>
157               <artifactId>${project.artifactId}.full-client</artifactId>
158               <file>${java-client}</file>
159               <sources>${java-client-sources}</sources>
160             </configuration>
161           </execution>
162           <execution>
163             <!-- install full java json client -->
164             <id>install-full-json-client</id>
165             <phase>install</phase>
166             <goals>
167               <goal>install-file</goal>
168             </goals>
169             <configuration>
170               <artifactId>${project.artifactId}.full-json-client</artifactId>
171               <file>${json-client}</file>
172               <sources>${json-client-sources}</sources>
173             </configuration>
174           </execution>
175         </executions>
176       </plugin>
177
178       <plugin>
179         <groupId>org.apache.maven.plugins</groupId>
180         <artifactId>maven-deploy-plugin</artifactId>
181         <version>2.5</version>
182         <configuration>
183           <packaging>jar</packaging>
184           <generatePom>true</generatePom>
185           <groupId>${project.groupId}</groupId>
186           <version>${project.version}</version>
187           <url>${project.distributionManagement.repository.url}</url>
188         </configuration>
189         <executions>
190           <execution>
191             <!-- skip default deploy -->
192             <id>default-deploy</id>
193             <phase>deploy</phase>
194             <goals>
195               <goal>deploy</goal>
196             </goals>
197             <configuration>
198               <skip>true</skip>
199             </configuration>
200           </execution>
201           <execution>
202             <!-- deploy full java client -->
203             <id>deploy-full-client</id>
204             <phase>deploy</phase>
205             <goals>
206               <goal>deploy-file</goal>
207             </goals>
208             <configuration>
209               <artifactId>${project.artifactId}.full-client</artifactId>
210               <file>${java-client}</file>
211               <sources>${java-client-sources}</sources>
212             </configuration>
213           </execution>
214           <execution>
215             <!-- deploy full java json client -->
216             <id>deploy-full-json-client</id>
217             <phase>deploy</phase>
218             <goals>
219               <goal>deploy-file</goal>
220             </goals>
221             <configuration>
222               <artifactId>${project.artifactId}.full-json-client</artifactId>
223               <file>${json-client}</file>
224               <sources>${json-client-sources}</sources>
225             </configuration>
226           </execution>
227        </executions>
228     </plugin>
229
230     </plugins>
231   </build>
232   <dependencies>
233     <dependency>
234       <groupId>org.codehaus.enunciate</groupId>
235       <artifactId>enunciate-core-annotations</artifactId>
236       <version>${enunciate.version}</version>
237     </dependency>
238
239     <!-- add dependency on all northbound bundles -->
240     <dependency>
241       <groupId>org.opendaylight.controller</groupId>
242       <artifactId>connectionmanager.northbound</artifactId>
243       <version>0.1.1-SNAPSHOT</version>
244     </dependency>
245     <dependency>
246       <groupId>org.opendaylight.controller</groupId>
247       <artifactId>controllermanager.northbound</artifactId>
248       <version>0.0.1-SNAPSHOT</version>
249     </dependency>
250     <dependency>
251       <groupId>org.opendaylight.controller</groupId>
252       <artifactId>flowprogrammer.northbound</artifactId>
253       <version>0.4.1-SNAPSHOT</version>
254     </dependency>
255     <dependency>
256       <groupId>org.opendaylight.controller</groupId>
257       <artifactId>hosttracker.northbound</artifactId>
258       <version>0.4.1-SNAPSHOT</version>
259     </dependency>
260     <dependency>
261       <groupId>org.opendaylight.controller</groupId>
262       <artifactId>networkconfig.bridgedomain.northbound</artifactId>
263       <version>0.0.2-SNAPSHOT</version>
264     </dependency>
265     <dependency>
266       <groupId>org.opendaylight.controller</groupId>
267       <artifactId>networkconfig.neutron.northbound</artifactId>
268       <version>0.4.1-SNAPSHOT</version>
269     </dependency>
270     <dependency>
271       <groupId>org.opendaylight.controller</groupId>
272       <artifactId>forwarding.staticrouting.northbound</artifactId>
273       <version>0.4.1-SNAPSHOT</version>
274     </dependency>
275     <dependency>
276       <groupId>org.opendaylight.controller</groupId>
277       <artifactId>statistics.northbound</artifactId>
278       <version>0.4.1-SNAPSHOT</version>
279     </dependency>
280     <dependency>
281       <groupId>org.opendaylight.controller</groupId>
282       <artifactId>subnets.northbound</artifactId>
283       <version>0.4.1-SNAPSHOT</version>
284     </dependency>
285     <dependency>
286       <groupId>org.opendaylight.controller</groupId>
287       <artifactId>switchmanager.northbound</artifactId>
288       <version>0.4.1-SNAPSHOT</version>
289     </dependency>
290     <dependency>
291       <groupId>org.opendaylight.controller</groupId>
292       <artifactId>topology.northbound</artifactId>
293       <version>0.4.1-SNAPSHOT</version>
294     </dependency>
295     <dependency>
296       <groupId>org.opendaylight.controller</groupId>
297       <artifactId>usermanager.northbound</artifactId>
298       <version>0.0.1-SNAPSHOT</version>
299     </dependency>
300   </dependencies>
301 </project>