-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathbuild-nexus-report.xml
More file actions
97 lines (78 loc) · 3.09 KB
/
Copy pathbuild-nexus-report.xml
File metadata and controls
97 lines (78 loc) · 3.09 KB
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
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="build-nexus-report">
<taskdef
classpath="../lib/development/ant-contrib.jar"
resource="net/sf/antcontrib/antlib.xml"
/>
<property file="nexus.report.properties" />
<target depends="get-repository-index,init-report-files" name="build-module-availability-report">
<subant target="build-module-availability-report">
<fileset
dir="."
>
<exclude name="**/samples/**/*" />
<exclude name="themes/**/*" />
<include name="**/build.xml" />
</fileset>
<property name="nexus.reports.dir" value="${nexus.reports.dir}" />
<property name="repository.index" value="${repository.index}" />
</subant>
</target>
<target depends="get-repository-index,init-report-files" name="build-module-stale-report">
<loadfile
property="modules.symbolic.names.list"
srcFile="${nexus.reports.dir}/modules.symbolic.names.list"
/>
<delete file="${nexus.reports.dir}/modules.symbolic.names.list" />
<for delimiter="${line.separator}" list="${repository.index}" param="nexus.module">
<sequential>
<if>
<not>
<contains string="${modules.symbolic.names.list}" substring="@{nexus.module}" />
</not>
<then>
<echo append="true" file="${nexus.reports.dir}/stale.modules.txt">${line.separator}@{nexus.module}</echo>
</then>
</if>
</sequential>
</for>
</target>
<target depends="build-module-availability-report,build-module-stale-report" name="build-nexus-report" />
<target name="clean">
<delete dir="${basedir}/nexus-reports" />
</target>
<target depends="prepare-report-dir" name="get-repository-index">
<get
dest="${nexus.reports.dir}/${repository.name}.index"
src="https://repository-cdn.liferay.com/nexus/content/repositories/${repository.name}/com/liferay"
/>
<replaceregexp
file="${nexus.reports.dir}/${repository.name}.index"
flags="gm"
match="[\s\S]*?https:\/\/repository\.liferay\.com\/nexus\/content\/repositories\/${repository.name}\/com\/liferay\/([0-9a-z.]+)\/[\s\S]*?"
replace="\1${line.separator}"
/>
<replaceregexp
file="${nexus.reports.dir}/${repository.name}.index"
flags="m"
match=""[\s\S]*"
replace=""
/>
<loadfile
property="repository.index"
srcFile="${nexus.reports.dir}/${repository.name}.index"
/>
<delete file="${nexus.reports.dir}/${repository.name}.index" />
</target>
<target depends="prepare-report-dir" name="init-report-files">
<echo file="${nexus.reports.dir}/available.modules.txt">The following modules were found in ${repository.name}:${line.separator}</echo>
<echo file="${nexus.reports.dir}/stale.modules.txt">The following modules were found in ${repository.name}, but do not currently exist in the source code:${line.separator}</echo>
<echo file="${nexus.reports.dir}/unavailable.modules.txt">The following modules were not found in ${repository.name}:${line.separator}</echo>
</target>
<target name="prepare-report-dir">
<property name="nexus.reports.dir" value="${basedir}/nexus-reports/${repository.name}" />
<delete dir="${nexus.reports.dir}" />
<mkdir dir="${nexus.reports.dir}" />
</target>
</project>