forked from oVirt/ovirt-engine-api-model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
405 lines (358 loc) · 13.7 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.ovirt.engine.api</groupId>
<artifactId>model</artifactId>
<version>4.3.1-SNAPSHOT</version>
<name>oVirt API Model</name>
<description>
Model management tools for the oVirt Engine API.
</description>
<url>http://www.ovirt.org</url>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>Juan Hernandez</name>
<email>[email protected]</email>
<organization>oVirt</organization>
<organizationUrl>http://www.ovirt.org</organizationUrl>
</developer>
<developer>
<name>Ori Liel</name>
<email>[email protected]</email>
<organization>oVirt</organization>
<organizationUrl>http://www.ovirt.org</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://gerrit.ovirt.org/ovirt-engine-api-model.git</connection>
<developerConnection>scm:git:git://gerrit.ovirt.org/ovirt-engine-api-model.git</developerConnection>
<url>git://gerrit.ovirt.org/ovirt-engine-api-model.git</url>
<tag>HEAD</tag>
</scm>
<properties>
<!-- Always use UTF-8 for source code: -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- The version of the metamodel used to specify the model and to generate
code from it: -->
<metamodel.version>1.2.10</metamodel.version>
<!-- The name of the product and the engine that will be used in the generated
documentation: -->
<product.name>oVirt</product.name>
<engine.name>oVirt Engine</engine.name>
<!-- The separator used in the identifiers of the sections of the
generated AsciiDoc: -->
<adoc.separator>/</adoc.separator>
<!-- Flag indicating if the CSS of the generated HTML documentation
should be linked or embedded: -->
<adoc.linkcss>false</adoc.linkcss>
<!-- Do not generate Javadoc, as we explicitly generate a documentation
artifact containing the AsciiDoc and HTML generated from the
model: -->
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
<dependencies>
<dependency>
<groupId>org.ovirt.engine.api</groupId>
<artifactId>metamodel-annotations</artifactId>
<version>${metamodel.version}</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!-- Make sure we use Java 8: -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.3</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- Generate the AsciiDoc documentation: -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-doc</id>
<phase>generate-sources</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.ovirt.api.metamodel.tool.Main</mainClass>
<arguments>
<argument>org.ovirt.api.metamodel.tool.Tool</argument>
<argument>--model=${project.basedir}/src/main/java</argument>
<argument>--adoc-separator=${adoc.separator}</argument>
<argument>--adoc-attribute=product-name:${product.name}</argument>
<argument>--adoc-attribute=engine-name:${engine.name}</argument>
<argument>--adoc-attribute=icons:font</argument>
<argument>--adoc-separator=${adoc.separator}</argument>
<argument>--docs=${project.basedir}/target/generated-adoc</argument>
<argument>--json-description=${project.basedir}/target/generated-json/model.json</argument>
<argument>--xml-description=${project.basedir}/target/generated-xml/model.xml</argument>
<argument>--report=${project.basedir}/target/generated-csv/model.csv</argument>
</arguments>
<includePluginDependencies>true</includePluginDependencies>
<includeProjectDependencies>false</includeProjectDependencies>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.ovirt.engine.api</groupId>
<artifactId>metamodel-tool</artifactId>
<version>${metamodel.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- Generate the HTML documentation: -->
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-html</id>
<phase>compile</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/target/generated-adoc</sourceDirectory>
<outputDirectory>${project.basedir}/target/generated-html</outputDirectory>
<backend>html5</backend>
<attributes>
<product-name>${product.name}</product-name>
<engine-name>${engine.name}</engine-name>
<linkcss>${adoc.linkcss}</linkcss>
<toc>right</toc>
<sectnums>true</sectnums>
<sectlinks>true</sectlinks>
<sectanchors>true</sectanchors>
<source-highlighter>highlightjs</source-highlighter>
<icons>font</icons>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
<!-- Generate a .jar file containing the generared AsciiDoc
and HTML documentation, and attach it as the Javadoc
artifact: -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-docjar</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<property name="docjar" value="${project.basedir}/target/doc.jar" />
<zip destfile="${docjar}">
<fileset dir="${project.basedir}/target/generated-adoc" />
<fileset dir="${project.basedir}/target/generated-html" />
<fileset dir="${project.basedir}/target/generated-json" />
<fileset dir="${project.basedir}/target/generated-xml" />
</zip>
<attachartifact file="${docjar}" classifier="javadoc" type="jar" />
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<tagNameFormat>@{version}</tagNameFormat>
<pushChanges>false</pushChanges>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<!-- This profile is used to sign the artifacts when performing
releases. -->
<profile>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- This profile is used to generate the DocBook documentation: -->
<profile>
<id>publican</id>
<!-- Publican doesn't accept slashes inside section identifiers, so
we need to use a dashes instead: -->
<properties>
<adoc.separator>-</adoc.separator>
</properties>
<build>
<plugins>
<!-- Generate the DockBook file: -->
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-docbook</id>
<phase>compile</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/target/generated-adoc</sourceDirectory>
<outputDirectory>${project.basedir}/target/generated-docbook</outputDirectory>
<backend>docbook5</backend>
<doctype>book</doctype>
</configuration>
</execution>
</executions>
</plugin>
<!-- Prepare the generated DocBook so that it can be processed
by Publican, and then run Publican: -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>run-publican</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="${project.basedir}/target/generated-publican" />
<copy todir="${project.basedir}/target/generated-publican">
<fileset dir="${project.basedir}/src/main/publican" />
</copy>
<xslt in="${project.basedir}/target/generated-docbook/model.xml" style="${project.basedir}/target/generated-publican/en-US/API_Guide.xsl" out="${project.basedir}/target/generated-publican/en-US/API_Guide.xml" />
<exec executable="publican" dir="${project.basedir}/target/generated-publican">
<arg value="build" />
<arg value="--langs=en-US" />
<arg value="--formats=html" />
<arg value="--publish" />
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- This profile is used to generate the PDF documentation: -->
<profile>
<id>pdf</id>
<build>
<plugins>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-pdf</artifactId>
<version>1.5.0-alpha.11</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-pdf</id>
<phase>compile</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/target/generated-adoc</sourceDirectory>
<outputDirectory>${project.basedir}/target/generated-pdf</outputDirectory>
<backend>pdf</backend>
<attributes>
<product-name>${product.name}</product-name>
<engine-name>${engine.name}</engine-name>
<toc />
<sectnums>true</sectnums>
<sectlinks>true</sectlinks>
<sectanchors>true</sectanchors>
<source-highlighter>rouge</source-highlighter>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
</distributionManagement>
</project>