-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathextensions-build.xml
120 lines (95 loc) · 6.1 KB
/
extensions-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
120
<?xml version="1.0" encoding="utf-8"?>
<project name="Release_build" default="deploy">
<path id="xmltask.path">
<pathelement path="${basedir}/xmltask.jar" />
</path>
<taskdef name="xmltask" classpathref="xmltask.path" classname="com.oopsconsultancy.xmltask.ant.XmlTask" />
<property name="home" value="${ant.file.Release_build}/../" />
<!-- SYSTEM RELATED -->
<property environment="system" />
<property name="jboss.home" value="${system.JBOSS_HOME}" />
<property name="jboss.deploy" value="${jboss.home}/standalone/deployments" />
<property name="jboss.modules.path" value="${jboss.home}/modules/system/layers/base" />
<property name="jboss.standalone.path" value="${jboss.home}/standalone" />
<property name="restcomm-gmlc.path" value="${jboss.modules.path}/org/mobicents/gmlc/bootstrap" />
<property name="jss7.path" value="${jboss.home}/../extra/restcomm-ss7/ss7-wildfly"/>
<condition property="file_url" value="file:/">
<os family="windows" />
</condition>
<property name="file_url" value="file://" />
<pathconvert targetos="unix" property="jboss.home.standard">
<path description="To use the same stile for every url file" path="${jboss.home}" />
</pathconvert>
<target name="deploy">
<!-- Reference to GMLC module from SLEE -->
<xmltask source="${jboss.modules.path}/org/restcomm/slee/container/lib/main/module.xml" dest="${jboss.modules.path}/org/restcomm/slee/container/lib/main/module.xml">
<remove path="/:module/:dependencies/:module[@name='org.mobicents.gmlc.bootstrap']" />
<insert path="/:module/:dependencies/:module[last()]" position="after">
<![CDATA[<module xmlns="urn:jboss:module:1.0" name="org.mobicents.gmlc.bootstrap" export="true"/>]]>
</insert>
</xmltask>
<xmlproperty file="${jboss.standalone.path}/configuration/standalone.xml" keeproot="true" />
<property name="serverXmlns" value="${server(xmlns)}" />
<!-- Adding of GMLC extension -->
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<insert path="/:server/:extensions/:extension[last()]" position="after">
<![CDATA[<extension xmlns="${serverXmlns}" module="org.mobicents.gmlc.bootstrap"/>]]>
</insert>
</xmltask>
<!-- Updating of subsystem SS7-WildFly with needed by GMLC stack set -->
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:profile/*[local-name()='subsystem'][*[local-name()='mbean'][namespace-uri()='urn:org.restcomm:ss7-wildfly:1.0'][@reflection]]" />
<insert path="/:server/:profile/*[local-name()='subsystem'][last()]" position="after" file="wildfly-jss7-subsystem.txt" />
</xmltask>
<!-- Adding of subsystem gmlc-extensions -->
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:profile/*[local-name()='subsystem'][*[local-name()='mbean'][namespace-uri()='urn:org.mobicents:gmlc-extensions:1.0'][@reflection]]" />
<insert path="/:server/:profile/*[local-name()='subsystem'][last()]" position="after" file="wildfly-gmlc-subsystem.txt" />
</xmltask>
<!-- Updating of domain:logging for GMLC settings -->
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:profile/*[local-name()='subsystem'][*[namespace-uri()='urn:jboss:domain:logging:3.0']]" />
<insert path="/:server/:profile/*[local-name()='subsystem'][last()]" position="after" file="gmlc-logging.txt" />
</xmltask>
<!-- Copy GMLC Modules -->
<copy overwrite="true" todir="${restcomm-gmlc.path}">
<fileset dir="${basedir}/module">
<include name="*/**" />
</fileset>
</copy>
</target>
<target name="deploy-all" depends="deploy">
<!--<ant antfile="${smpp-extensions.path}/build.xml" target="deploy" inheritAll="false">
<property name="jboss.home" value="${jboss.home}" />
</ant>-->
<ant antfile="${jss7.path}/build.xml" target="deploy" inheritAll="false">
<property name="jboss.home" value="${jboss.home}" />
</ant>
</target>
<target name="undeploy">
<xmltask source="${jboss.modules.path}/org/restcomm/slee/container/lib/main/module.xml" dest="${jboss.modules.path}/org/restcomm/slee/container/lib/main/module.xml">
<remove path="/:module/:dependencies/:module[@name='org.mobicents.gmlc.bootstrap']" />
</xmltask>
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:extensions/:extension[@module='org.mobicents.gmlc.bootstrap']" />
</xmltask>
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:profile/*[local-name()='subsystem'][*[local-name()='mbean'][namespace-uri()='urn:org.restcomm:ss7-wildfly:1.0'][@reflection]]" />
</xmltask>
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:profile/*[local-name()='subsystem'][*[local-name()='mbean'][namespace-uri()='urn:org.mobicents:gmlc-extensions:1.0']]" />
</xmltask>
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:profile/*[local-name()='subsystem'][*[local-name()='mbean'][namespace-uri()='urn:org.mobicents:gmlc-extensions:1.0'][@reflection]]" />
</xmltask>
<xmltask source="${jboss.standalone.path}/configuration/standalone.xml" dest="${jboss.standalone.path}/configuration/standalone.xml">
<remove path="/:server/:profile/*[local-name()='subsystem'][*[namespace-uri()='urn:jboss:domain:logging:3.0']]" />
</xmltask>
<delete dir="${restcomm-gmlc.path}" />
</target>
<target name="undeploy-all" depends="undeploy">
<ant antfile="${jss7.path}/build.xml" target="undeploy" inheritAll="false">
<property name="jboss.home" value="${jboss.home}" />
</ant>
</target>
</project>