-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwarbuilder.xml
43 lines (39 loc) · 1.62 KB
/
warbuilder.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="weixin" basedir="." default="restore">
<!--AWS发布版配置-->
<target name="init">
<replaceregexp file="WebRoot/WEB-INF/config/cache.xml" match="127.0.0.1"
replace="ecache.gzyydf.0001.apse1.cache.amazonaws.com" byline="true"/>
<replaceregexp file="WebRoot/WEB-INF/config/database.xml" match="127.0.0.1"
replace="wordpress-db.cjdr5s24owqm.ap-southeast-1.rds.amazonaws.com" byline="true"/>
<replaceregexp file="WebRoot/WEB-INF/config/database.xml" match="root@mysql"
replace="rootpass" byline="true"/>
</target>
<!--打包整个war-->
<target name="buildwar" depends="init">
<war basedir="WebRoot" destfile="youyou.war" webxml="WebRoot/WEB-INF/web.xml">
<exclude name="WEB-INF/**" />
<webinf dir="WebRoot/WEB-INF/" >
<include name="lib/*.jar" />
</webinf>
<webinf dir="WebRoot/WEB-INF" >
<include name="**/*.class" />
</webinf>
<webinf dir="WebRoot/WEB-INF">
<include name="**/*.properties" />
</webinf>
<webinf dir="WebRoot/WEB-INF">
<include name="config/*.xml" />
</webinf>
</war>
</target>
<!--恢复本地测试版配置 -->
<target name="restore" depends="buildwar">
<replaceregexp file="WebRoot/WEB-INF/config/cache.xml" match="ecache.gzyydf.0001.apse1.cache.amazonaws.com"
replace="127.0.0.1" byline="true"/>
<replaceregexp file="WebRoot/WEB-INF/config/database.xml" match="wordpress-db.cjdr5s24owqm.ap-southeast-1.rds.amazonaws.com"
replace="127.0.0.1" byline="true"/>
<replaceregexp file="WebRoot/WEB-INF/config/database.xml" match="rootpass"
replace="root@mysql" byline="true"/>
</target>
</project>