forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-test-solr.xml
74 lines (65 loc) · 1.9 KB
/
build-test-solr.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
<?xml version="1.0"?>
<project name="portal-test-solr" basedir="." xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<macrodef name="prepare-solr">
<sequential>
<copy overwrite="true" todir="${app.server.parent.dir}/solr-${solr.version}/example/solr/collection1/conf">
<fileset dir="${lp.plugins.dir}/webs/solr4-web/docroot/WEB-INF/conf/">
<include name="schema.xml" />
<include name="solrconfig.xml" />
</fileset>
</copy>
</sequential>
</macrodef>
<macrodef name="unzip-solr">
<sequential>
<delete dir="${app.server.parent.dir}/solr-${solr.version}" />
<if>
<not>
<available file="${app.server.parent.dir}/${solr.zip.name}" />
</not>
<then>
<get
dest="${app.server.parent.dir}/${solr.zip.name}"
src="${solr.zip.url}"
verbose="true"
/>
</then>
</if>
<unzip
dest="${app.server.parent.dir}"
src="${app.server.parent.dir}/${solr.zip.name}"
/>
</sequential>
</macrodef>
<target name="prepare-solr-web-properties">
<if>
<available file="${lp.plugins.dir}/shared/solr4-shared/src/solr.properties" />
<then>
<echo file="${lp.plugins.dir}/webs/solr4-web/docroot/WEB-INF/src/solr-ext.properties">server.http.url=http://localhost:8983/solr</echo>
</then>
<else>
<replace
file="${lp.plugins.dir}/webs/solr4-web/docroot/WEB-INF/src/META-INF/solr-spring.xml"
token="property name="url" value="http://localhost:8080/solr""
value="property name="url" value="http://localhost:8983/solr""
/>
</else>
</if>
</target>
<target name="start-solr">
<unzip-solr />
<prepare-solr />
<parallel>
<daemons>
<exec
dir="${app.server.parent.dir}/solr-${solr.version}/example"
executable="java"
failonerror="true"
>
<arg line="-jar start.jar" />
</exec>
</daemons>
</parallel>
</target>
</project>