-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
124 lines (105 loc) · 5 KB
/
build.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="Apache Knox Gateway Site" default="generate" basedir=".">
<description>
Release build file for the Apache Knox Gateway
</description>
<property name="gateway-name" value="Apache Knox Gateway (Incubator)"/>
<property name="gateway-project" value="knox"/>
<property name="gateway-artifact" value="${gateway-project}-incubating"/>
<property name="release-manager" value="kminder"/>
<property name="book-target" value="../site/books"/>
<property name="book-0-3-0-dir" value="${book-target}/${gateway-artifact}-0-3-0"/>
<property name="book-0-3-0-file" value="${book-0-3-0-dir}/${gateway-artifact}-0-3-0.html"/>
<property name="book-0-4-0-dir" value="${book-target}/${gateway-artifact}-0-4-0"/>
<property name="book-0-4-0-file" value="${book-0-4-0-dir}/${gateway-artifact}-0-4-0.html"/>
<property name="svn.release.path" value="https://dist.apache.org/repos/dist/release/incubator/${gateway-project}" />
<property name="svn.staging.path" value="https://dist.apache.org/repos/dist/dev/incubator/${gateway-project}" />
<condition property="isUnix">
<os family="unix"/>
</condition>
<condition property="mvn.cmd" value="mvn">
<os family="unix" />
</condition>
<condition property="mvn.cmd" value="mvn.bat">
<os family="windows" />
</condition>
<condition property="svn.cmd" value="svn">
<os family="unix" />
</condition>
<condition property="svn.cmd" value="svn">
<os family="windows" />
</condition>
<condition property="browser.cmd" value="open">
<os family="unix" />
</condition>
<condition property="browser.cmd" value="start">
<os family="windows" />
</condition>
<target name="init" description="Initialize the build.">
</target>
<target name="clean" depends="init" description="Clean up any build artifacts.">
<delete file="target"/>
</target>
<target name="generate" depends="site,books" description="Clean up any build artifacts."/>
<target name="site" depends="_site"/>
<target name="_site" depends="init">
<delete dir="../site" includes="**/*.html,**/*.css,**/*.png"/>
<exec executable="${mvn.cmd}">
<arg value="-N"/>
<arg value="site"/>
</exec>
</target>
<target name="books" depends="markbook,_books"/>
<target name="_books" depends="_book-0-3-0,_book-0-4-0"/>
<target name="_book-0-3-0" depends="init">
<delete dir="${book-target}/${gateway-artifact}-0-3-0" includes="**/*.html,**/*.css,**/*.png"/>
<java jar="markbook/target/markbook.jar" fork="true" failonerror="true">
<arg value="-i"/><arg value="books/0.3.0/book.md"/>
<arg value="-o"/><arg value="${book-0-3-0-file}"/>
</java>
<copy todir="${book-target}/${gateway-artifact}-0-3-0">
<fileset dir="books/static"/>
</copy>
</target>
<target name="_book-0-4-0" depends="init">
<delete dir="${book-target}/${gateway-artifact}-0-4-0" includes="**/*.html,**/*.css,**/*.png"/>
<java jar="markbook/target/markbook.jar" fork="true" failonerror="true">
<arg value="-i"/><arg value="books/0.4.0/book.md"/>
<arg value="-o"/><arg value="${book-0-4-0-file}"/>
</java>
<copy todir="${book-target}/${gateway-artifact}-0-4-0">
<fileset dir="books/static"/>
</copy>
</target>
<target name="markbook" depends="init" description="Build and package markbook tool.">
<exec executable="${mvn.cmd}">
<arg value="clean"/>
<arg value="package"/>
</exec>
</target>
<target name="review" depends="review-site,review-book" description="Open doc artifacts in a browser for review."/>
<target name="review-book" depends="init" description="Open the default book in the default browser.">
<exec executable="${browser.cmd}">
<arg line="${book-0-4-0-file}" />
</exec>
</target>
<target name="review-site" depends="init" description="Open the book in the default browser.">
<exec executable="${browser.cmd}">
<arg line="../site/index.html" />
</exec>
</target>
</project>