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>
5 <groupId>org.opendaylight.controller</groupId>
6 <artifactId>enunciate-parent</artifactId>
7 <version>1.6.0-SNAPSHOT</version>
8 <relativePath>../../../commons/enunciate-parent</relativePath>
11 <artifactId>northbound.client</artifactId>
12 <version>0.2.0-SNAPSHOT</version>
13 <packaging>pom</packaging>
16 <docs.output.dir>${project.build.directory}/rest-api-docs</docs.output.dir>
17 <java-client>${project.build.directory}/enunciate/build/java-client/full-client.jar</java-client>
18 <java-client-sources>${project.build.directory}/enunciate/build/java-client/full-client-sources.jar</java-client-sources>
23 <groupId>org.codehaus.enunciate</groupId>
24 <artifactId>enunciate-core-annotations</artifactId>
27 <!-- add dependency on all northbound bundles -->
29 <groupId>org.opendaylight.controller</groupId>
30 <artifactId>connectionmanager.northbound</artifactId>
33 <groupId>org.opendaylight.controller</groupId>
34 <artifactId>controllermanager.northbound</artifactId>
37 <groupId>org.opendaylight.controller</groupId>
38 <artifactId>flowprogrammer.northbound</artifactId>
41 <groupId>org.opendaylight.controller</groupId>
42 <artifactId>forwarding.staticrouting.northbound</artifactId>
45 <groupId>org.opendaylight.controller</groupId>
46 <artifactId>hosttracker.northbound</artifactId>
49 <groupId>org.opendaylight.controller</groupId>
50 <artifactId>networkconfig.bridgedomain.northbound</artifactId>
53 <groupId>org.opendaylight.controller</groupId>
54 <artifactId>statistics.northbound</artifactId>
57 <groupId>org.opendaylight.controller</groupId>
58 <artifactId>subnets.northbound</artifactId>
61 <groupId>org.opendaylight.controller</groupId>
62 <artifactId>switchmanager.northbound</artifactId>
65 <groupId>org.opendaylight.controller</groupId>
66 <artifactId>topology.northbound</artifactId>
69 <groupId>org.opendaylight.controller</groupId>
70 <artifactId>usermanager.northbound</artifactId>
78 <groupId>org.apache.maven.plugins</groupId>
79 <artifactId>maven-antrun-plugin</artifactId>
82 <taskdef classpathref="maven.plugin.classpath" resource="net/sf/antcontrib/antcontrib.properties"></taskdef>
83 <patternset id="rest.paths">
84 <include name="**/target/site/wsdocs/**"></include>
85 <exclude name="**/java-client/**"></exclude>
88 <echo message="======== Assembling enunciate docs ========"></echo>
89 <!-- cleanup existing generated files -->
90 <delete dir="${docs.output.dir}"></delete>
91 <delete file="${docs.output.dir}.zip"></delete>
92 <mkdir dir="${docs.output.dir}"></mkdir>
93 <!-- copy enunciate docs to stage -->
94 <copy todir="${docs.output.dir}">
95 <fileset dir="${basedir}/../../..">
96 <patternset refid="rest.paths"></patternset>
98 <mapper from="^(.*)/([^/]+)/target/site/wsdocs/(.*)$$" to="\2/\3" type="regexp"></mapper>
100 <!-- Remove Swagger doc link from enunciate generated index.html -->
101 <replaceregexp byline="false" match="<h2>Swagger</h2>${line.separator}\s*<p>${line.separator}.*${line.separator}\s*</p>" replace="">
102 <fileset dir="${docs.output.dir}">
103 <include name="**/index.html"></include>
106 <!-- generate index.html -->
107 <!-- append header -->
108 <echo append="true" file="${docs.output.dir}/index.html"><![CDATA[
111 <title> OpenDaylight REST API Documentation </title>
114 <h2>OpenDaylight REST API Documentation</h2>
115 <p> OpenDaylight supports the following <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">Representational State Transfer (REST)</a> APIs: </p>
118 <dirset dir="${docs.output.dir}" id="nbset">
119 <include name="*"></include>
121 <pathconvert pathsep="&#36;{line.separator}" property="nbs" refid="nbset"></pathconvert>
122 <echo append="true" file="${docs.output.dir}/index.html" message="${nbs}"></echo>
123 <replaceregexp byline="true" file="${docs.output.dir}/index.html" match="^\${docs.output.dir}/(.*)$" replace="&lt;li&gt;&lt;a href=\1/index.html&gt; \1 &lt;/a&gt;&lt;/li&gt;"></replaceregexp>
125 <!-- append footer -->
126 <echo append="true" file="${docs.output.dir}/index.html"><![CDATA[
128 <i>---</i>
132 <!-- archive all the docs excluding whatever is not needed -->
133 <echo message="======== Archiving enunciate docs ========"></echo>
134 <zip destfile="${docs.output.dir}.zip">
135 <zipfileset dir="${docs.output.dir}"></zipfileset>
138 <echo message="======== Build successful ========"></echo>
139 <echo message="REST docs archive: ${docs.output.dir}.zip"></echo>
144 <groupId>ant-contrib</groupId>
145 <artifactId>ant-contrib</artifactId>
146 <version>20020829</version>
154 <phase>package</phase>
160 <groupId>org.codehaus.mojo</groupId>
161 <artifactId>build-helper-maven-plugin</artifactId>
164 <id>attach-artifacts</id>
166 <goal>attach-artifact</goal>
168 <phase>package</phase>
172 <file>${java-client}</file>
174 <classifier>full-java-client</classifier>
177 <file>${java-client-sources}</file>
179 <classifier>full-java-client-sources</classifier>
189 <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
190 <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
192 <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>