Merge "Startup archetype: remove 'Impl' from config subsystem Module name."
[controller.git] / opendaylight / adsal / 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>enunciate-parent</artifactId>
7     <version>1.5.0-SNAPSHOT</version>
8     <relativePath>../../../commons/enunciate-parent</relativePath>
9   </parent>
10
11   <artifactId>northbound.client</artifactId>
12   <version>0.1.0-SNAPSHOT</version>
13   <packaging>pom</packaging>
14
15   <properties>
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>
19   </properties>
20
21   <dependencies>
22     <dependency>
23       <groupId>org.codehaus.enunciate</groupId>
24       <artifactId>enunciate-core-annotations</artifactId>
25     </dependency>
26
27     <!-- add dependency on all northbound bundles -->
28     <dependency>
29       <groupId>org.opendaylight.controller</groupId>
30       <artifactId>connectionmanager.northbound</artifactId>
31     </dependency>
32     <dependency>
33       <groupId>org.opendaylight.controller</groupId>
34       <artifactId>controllermanager.northbound</artifactId>
35     </dependency>
36     <dependency>
37       <groupId>org.opendaylight.controller</groupId>
38       <artifactId>flowprogrammer.northbound</artifactId>
39     </dependency>
40     <dependency>
41       <groupId>org.opendaylight.controller</groupId>
42       <artifactId>forwarding.staticrouting.northbound</artifactId>
43     </dependency>
44     <dependency>
45       <groupId>org.opendaylight.controller</groupId>
46       <artifactId>hosttracker.northbound</artifactId>
47     </dependency>
48     <dependency>
49       <groupId>org.opendaylight.controller</groupId>
50       <artifactId>networkconfig.bridgedomain.northbound</artifactId>
51     </dependency>
52     <dependency>
53       <groupId>org.opendaylight.controller</groupId>
54       <artifactId>networkconfig.neutron.northbound</artifactId>
55     </dependency>
56     <dependency>
57       <groupId>org.opendaylight.controller</groupId>
58       <artifactId>statistics.northbound</artifactId>
59     </dependency>
60     <dependency>
61       <groupId>org.opendaylight.controller</groupId>
62       <artifactId>subnets.northbound</artifactId>
63     </dependency>
64     <dependency>
65       <groupId>org.opendaylight.controller</groupId>
66       <artifactId>switchmanager.northbound</artifactId>
67     </dependency>
68     <dependency>
69       <groupId>org.opendaylight.controller</groupId>
70       <artifactId>topology.northbound</artifactId>
71     </dependency>
72     <dependency>
73       <groupId>org.opendaylight.controller</groupId>
74       <artifactId>usermanager.northbound</artifactId>
75     </dependency>
76   </dependencies>
77
78   <build>
79     <plugins>
80
81       <plugin>
82         <groupId>org.apache.maven.plugins</groupId>
83         <artifactId>maven-antrun-plugin</artifactId>
84         <configuration>
85           <target>
86             <taskdef classpathref="maven.plugin.classpath" resource="net/sf/antcontrib/antcontrib.properties"></taskdef>
87             <patternset id="rest.paths">
88               <include name="**/target/site/wsdocs/**"></include>
89               <exclude name="**/java-client/**"></exclude>
90             </patternset>
91
92             <echo message="======== Assembling enunciate docs ========"></echo>
93             <!-- cleanup existing generated files -->
94             <delete dir="${docs.output.dir}"></delete>
95             <delete file="${docs.output.dir}.zip"></delete>
96             <mkdir dir="${docs.output.dir}"></mkdir>
97             <!-- copy enunciate docs to stage -->
98             <copy todir="${docs.output.dir}">
99               <fileset dir="${basedir}/../../..">
100                 <patternset refid="rest.paths"></patternset>
101               </fileset>
102               <mapper from="^(.*)/([^/]+)/target/site/wsdocs/(.*)$$" to="\2/\3" type="regexp"></mapper>
103             </copy>
104             <!-- Remove Swagger doc link from enunciate generated index.html -->
105             <replaceregexp byline="false" match="&lt;h2&gt;Swagger&lt;/h2&gt;${line.separator}\s*&lt;p&gt;${line.separator}.*${line.separator}\s*&lt;/p&gt;" replace="">
106               <fileset dir="${docs.output.dir}">
107                 <include name="**/index.html"></include>
108               </fileset>
109             </replaceregexp>
110             <!-- generate index.html -->
111             <!-- append header -->
112             <echo append="true" file="${docs.output.dir}/index.html">&lt;![CDATA[
113               &lt;html&gt;
114               &lt;head&gt;
115               &lt;title&gt; OpenDaylight REST API Documentation &lt;/title&gt;
116               &lt;/head&gt;
117               &lt;body&gt;
118               &lt;h2&gt;OpenDaylight REST API Documentation&lt;/h2&gt;
119               &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;
120               &lt;h4&gt;
121               ]]&gt;</echo>
122             <dirset dir="${docs.output.dir}" id="nbset">
123               <include name="*"></include>
124             </dirset>
125             <pathconvert pathsep="&amp;#36;{line.separator}" property="nbs" refid="nbset"></pathconvert>
126             <echo append="true" file="${docs.output.dir}/index.html" message="${nbs}"></echo>
127             <replaceregexp byline="true" file="${docs.output.dir}/index.html" match="^\${docs.output.dir}/(.*)$" 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;"></replaceregexp>
128
129             <!-- append footer -->
130             <echo append="true" file="${docs.output.dir}/index.html">&lt;![CDATA[
131               &lt;/h4&gt;
132               &lt;i&gt;---&lt;/i&gt;
133               &lt;/body&gt;
134               &lt;/html&gt;
135               ]]&gt;</echo>
136             <!-- archive all the docs excluding whatever is not needed -->
137             <echo message="======== Archiving enunciate docs ========"></echo>
138             <zip destfile="${docs.output.dir}.zip">
139               <zipfileset dir="${docs.output.dir}"></zipfileset>
140             </zip>
141
142             <echo message="======== Build successful ========"></echo>
143             <echo message="REST docs archive: ${docs.output.dir}.zip"></echo>
144           </target>
145         </configuration>
146         <dependencies>
147           <dependency>
148             <groupId>ant-contrib</groupId>
149             <artifactId>ant-contrib</artifactId>
150             <version>20020829</version>
151           </dependency>
152         </dependencies>
153         <executions>
154           <execution>
155             <goals>
156               <goal>run</goal>
157             </goals>
158             <phase>package</phase>
159           </execution>
160         </executions>
161       </plugin>
162
163       <plugin>
164         <groupId>org.codehaus.mojo</groupId>
165         <artifactId>build-helper-maven-plugin</artifactId>
166         <executions>
167           <execution>
168             <id>attach-artifacts</id>
169             <goals>
170               <goal>attach-artifact</goal>
171             </goals>
172             <phase>package</phase>
173             <configuration>
174               <artifacts>
175                 <artifact>
176                   <file>${java-client}</file>
177                   <type>jar</type>
178                   <classifier>full-java-client</classifier>
179                 </artifact>
180                 <artifact>
181                   <file>${java-client-sources}</file>
182                   <type>jar</type>
183                   <classifier>full-java-client-sources</classifier>
184                 </artifact>
185               </artifacts>
186             </configuration>
187           </execution>
188         </executions>
189       </plugin>
190     </plugins>
191   </build>
192   <scm>
193     <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
194     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
195     <tag>HEAD</tag>
196     <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:Main</url>
197   </scm>
198 </project>