4aa4e0328be3d9051e2cbb4f6f798b1992fd53bd
[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.2-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       </plugin>
35
36       <plugin>
37         <groupId>org.apache.maven.plugins</groupId>
38         <artifactId>maven-antrun-plugin</artifactId>
39         <version>1.5</version>
40         <executions>
41           <execution>
42             <phase>package</phase>
43             <goals>
44               <goal>run</goal>
45             </goals>
46           </execution>
47         </executions>
48         <configuration>
49           <target>
50             <taskdef resource="net/sf/antcontrib/antcontrib.properties"
51                      classpathref="maven.plugin.classpath" />
52             <patternset id="rest.paths">
53               <include name="**/target/site/wsdocs/**"/>
54               <exclude name="**/java-client/**"/>
55             </patternset>
56
57             <echo message="======== Assembling enunciate docs ========"/>
58             <!-- cleanup existing generated files -->
59             <delete dir="${docs.output.dir}"/>
60             <delete file="${docs.output.dir}.zip"/>
61             <mkdir dir="${docs.output.dir}"/>
62             <!-- copy enunciate docs to stage -->
63             <copy todir="${docs.output.dir}">
64               <fileset dir="${basedir}/../../..">
65                 <patternset refid="rest.paths"/>
66               </fileset>
67               <mapper type="regexp"
68                       from="^(.*)/([^/]+)/target/site/wsdocs/(.*)$$"
69                       to="\2/\3"/>
70             </copy>
71             <!-- generate index.html -->
72             <!-- append header -->
73             <echo file="${docs.output.dir}/index.html" append="true">
74               &lt;![CDATA[
75               &lt;html&gt;
76               &lt;head&gt;
77               &lt;title&gt; OpenDaylight REST API Documentation &lt;/title&gt;
78               &lt;/head&gt;
79               &lt;body&gt;
80               &lt;h2&gt;OpenDaylight REST API Documentation&lt;/h2&gt;
81               &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;
82               &lt;h4&gt;
83               ]]&gt;
84             </echo>
85             <dirset id="nbset" dir="${docs.output.dir}">
86               <include name="*"/>
87             </dirset>
88             <pathconvert pathsep="&amp;#36;{line.separator}"
89                          property="nbs"
90                          refid="nbset"/>
91             <echo file="${docs.output.dir}/index.html"
92                   append="true"
93                   message="${nbs}"/>
94             <replaceregexp file="${docs.output.dir}/index.html"
95                            match="^\${docs.output.dir}/(.*)$"
96                            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;"
97                            byline="true"/>
98
99             <!-- append footer -->
100             <echo file="${docs.output.dir}/index.html" append="true">
101               &lt;![CDATA[
102               &lt;/h4&gt;
103               &lt;i&gt;---&lt;/i&gt;
104               &lt;/body&gt;
105               &lt;/html&gt;
106               ]]&gt;
107             </echo>
108             <!-- archive all the docs excluding whatever is not needed -->
109             <echo message="======== Archiving enunciate docs ========"/>
110             <zip destfile="${docs.output.dir}.zip">
111               <zipfileset dir="${docs.output.dir}"/>
112             </zip>
113
114             <echo message="======== Build successful ========"/>
115             <echo message="REST docs archive: ${docs.output.dir}.zip"/>
116           </target>
117         </configuration>
118         <dependencies>
119           <dependency>
120             <groupId>ant-contrib</groupId>
121             <artifactId>ant-contrib</artifactId>
122             <version>20020829</version>
123           </dependency>
124         </dependencies>
125       </plugin>
126
127       <plugin>
128         <groupId>org.codehaus.mojo</groupId>
129         <artifactId>build-helper-maven-plugin</artifactId>
130         <version>1.8</version>
131         <executions>
132           <execution>
133             <id>attach-artifacts</id>
134             <phase>package</phase>
135             <goals>
136               <goal>attach-artifact</goal>
137             </goals>
138             <configuration>
139               <artifacts>
140                 <artifact>
141                   <file>${java-client}</file>
142                   <type>jar</type>
143                   <classifier>full-java-client</classifier>
144                 </artifact>
145                 <artifact>
146                   <file>${java-client-sources}</file>
147                   <type>jar</type>
148                   <classifier>full-java-client-sources</classifier>
149                 </artifact>
150                 <artifact>
151                   <file>${json-client}</file>
152                   <type>jar</type>
153                   <classifier>full-json-client</classifier>
154                 </artifact>
155                 <artifact>
156                   <file>${json-client-sources}</file>
157                   <type>jar</type>
158                   <classifier>full-json-client-sources</classifier>
159                 </artifact>
160               </artifacts>
161             </configuration>
162           </execution>
163         </executions>
164       </plugin>
165     </plugins>
166   </build>
167   <dependencies>
168     <dependency>
169       <groupId>org.codehaus.enunciate</groupId>
170       <artifactId>enunciate-core-annotations</artifactId>
171     </dependency>
172
173     <!-- add dependency on all northbound bundles -->
174     <dependency>
175       <groupId>org.opendaylight.controller</groupId>
176       <artifactId>connectionmanager.northbound</artifactId>
177     </dependency>
178     <dependency>
179       <groupId>org.opendaylight.controller</groupId>
180       <artifactId>controllermanager.northbound</artifactId>
181     </dependency>
182     <dependency>
183       <groupId>org.opendaylight.controller</groupId>
184       <artifactId>flowprogrammer.northbound</artifactId>
185     </dependency>
186     <dependency>
187       <groupId>org.opendaylight.controller</groupId>
188       <artifactId>hosttracker.northbound</artifactId>
189     </dependency>
190     <dependency>
191       <groupId>org.opendaylight.controller</groupId>
192       <artifactId>networkconfig.bridgedomain.northbound</artifactId>
193     </dependency>
194     <dependency>
195       <groupId>org.opendaylight.controller</groupId>
196       <artifactId>networkconfig.neutron.northbound</artifactId>
197     </dependency>
198     <dependency>
199       <groupId>org.opendaylight.controller</groupId>
200       <artifactId>forwarding.staticrouting.northbound</artifactId>
201     </dependency>
202     <dependency>
203       <groupId>org.opendaylight.controller</groupId>
204       <artifactId>statistics.northbound</artifactId>
205     </dependency>
206     <dependency>
207       <groupId>org.opendaylight.controller</groupId>
208       <artifactId>subnets.northbound</artifactId>
209     </dependency>
210     <dependency>
211       <groupId>org.opendaylight.controller</groupId>
212       <artifactId>switchmanager.northbound</artifactId>
213     </dependency>
214     <dependency>
215       <groupId>org.opendaylight.controller</groupId>
216       <artifactId>topology.northbound</artifactId>
217     </dependency>
218     <dependency>
219       <groupId>org.opendaylight.controller</groupId>
220       <artifactId>usermanager.northbound</artifactId>
221     </dependency>
222   </dependencies>
223 </project>