forked from liferay/liferay-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
92 lines (72 loc) · 4.4 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
<?xml version="1.0"?>
<project name="Properties to HTML conversion" default="build-properties-docs" basedir=".">
<property name="project.dir" value="." />
<property name="lib.dir" value="${project.dir}/lib" />
<property name="liferay.portal.dir" value="${project.dir}/../liferay-portal" />
<property name="properties.dir" value="${project.dir}/properties" />
<property name="properties.title" value="Portal Properties" />
<property name="properties.toc" value="true" />
<property name="properties.file.path" value="portal.properties" />
<property name="properties.dest.file.path" value="${properties.dir}"/>
<property name="portal.properties.file.path" value="${liferay.portal.dir}/portal-impl/src/portal.properties" />
<property name="system.properties.file.path" value="${liferay.portal.dir}/portal-impl/src/system.properties" />
<property name="liferay-plugin-package_6_1_0.properties.file.path" value="${liferay.portal.dir}/definitions/liferay-plugin-package_6_1_0.properties" />
<property name="liferay-plugin-package_6_2_0.properties.file.path" value="${liferay.portal.dir}/definitions/liferay-plugin-package_6_2_0.properties" />
<path id="lib.classpath">
<fileset dir="${lib.dir}" includes="*.jar" />
</path>
<taskdef name="bundle-properties" classname="com.liferay.portal.tools.PropertiesBundlerTask"
classpathref="lib.classpath"/>
<!-- To run the properties converter, use a command of the form ant -Dproperties.title="Page Title" -Dtoc="false" -Dproperties.file=/path/to/properties/file -->
<target name="properties-to-html" description="runs the properties converter">
<java fork="true"
classname="com.liferay.portal.tools.PropertiesConverter"
classpathref="lib.classpath"
>
<arg value="${properties.file.path}" />
<arg value="${properties.dest.file.path}" />
<arg value="${properties.title}" />
<arg value="${properties.toc}" />
</java>
</target>
<!-- To build the properties HTML files, use a command of the form ant
-Dliferay.portal.dir=<path-to-your-liferay-portal> -Dlp.version=<your-liferay-portal-version> -->
<target name="build-properties-docs" if="lp.version" depends="checkLpVersion" description="runs the properties converter to generate HTML versions of portal.properties, system.properties, and liferay-plugin-package.properties">
<echo message="Include argument "-Dliferay.portal.dir=yourPortalDir" if your portal is not ${liferay.portal.dir}."/>
<mkdir dir="${properties.dir}"/>
<antcall target="properties-to-html">
<param name="properties.title" value="Liferay ${lp.version} Portal Properties"/>
<param name="properties.toc" value="true"/>
<param name="properties.file.path" value="${portal.properties.file.path}"/>
<param name="properties.dest.file.path" value="${properties.dir}"/>
</antcall>
<antcall target="properties-to-html">
<param name="properties.title" value="Liferay ${lp.version} System Properties"/>
<param name="properties.toc" value="true"/>
<param name="properties.file.path" value="${system.properties.file.path}"/>
<param name="properties.dest.file.path" value="${properties.dir}"/>
</antcall>
<antcall target="properties-to-html">
<param name="properties.title" value="Liferay Plugin Package Properties 6.1"/>
<param name="properties.toc" value="true"/>
<param name="properties.file.path" value="${liferay-plugin-package_6_1_0.properties.file.path}"/>
<param name="properties.dest.file.path" value="${properties.dir}"/>
</antcall>
<antcall target="properties-to-html">
<param name="properties.title" value="Liferay Plugin Package Properties 6.2"/>
<param name="properties.toc" value="true"/>
<param name="properties.file.path" value="${liferay-plugin-package_6_2_0.properties.file.path}"/>
<param name="properties.dest.file.path" value="${properties.dir}"/>
</antcall>
<antcall target="bundle-properties-docs"/>
</target>
<target name="bundle-properties-docs" if="lp.version" depends="checkLpVersion" description="bundles the properties HTML files with an index.html file that lists the included files">
<bundle-properties lpVersion="${lp.version}" propertiesDir="${properties.dir}"/>
</target>
<target name="checkLpVersion" unless="lp.version">
<echo message="Missing lp.version property. Specify argument of form "-Dlp.version=yourPortalVersion""/>
</target>
<target name="clean" description="deletes the properties directory">
<delete dir="${properties.dir}"/>
</target>
</project>