forked from liferay/liferay-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
119 lines (96 loc) · 5.41 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
<?xml version="1.0"?>
<project name="Liferay Documentation" default="usage" basedir=".">
<property name="project.dir" value="." />
<property name="build.dir" value="${project.dir}/build"/>
<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="${project.dir}/lib" includes="*.jar" />
<fileset dir="${project.dir}/code/liferay-doc-utils/lib" includes="*.jar" />
</path>
<path id="project.classpath">
<path refid="lib.classpath" />
</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>
<target name="compare-portal-source" description="Generates reports comparing a Liferay 6 source directory (-Dlr6Dir) to a Liferay 7+ source directory (-Dlr7Dir).">
<property name="movedClassesFile" value="${build.dir}/moved-classes.html"/>
<property name="removedClassesFile" value="${build.dir}/removed-classes.html"/>
<mkdir dir="${build.dir}"/>
<java
classname="com.liferay.documentation.movedclassreporter.MovedClassReporterMain"
classpathref="project.classpath"
failonerror="true"
fork="true"
>
<arg value="${lr6Dir}"/>
<arg value="${lr7Dir}"/>
<arg value="${movedClassesFile}"/>
<arg value="${removedClassesFile}"/>
</java>
</target>
<target name="usage">
<echo message="Welcome to the Liferay Documentation project. To show target descriptions, run ant -projecthelp"/>
</target>
</project>