forked from RestComm/jss7
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.xml
More file actions
132 lines (114 loc) · 6.1 KB
/
build.xml
File metadata and controls
132 lines (114 loc) · 6.1 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?xml version="1.0" encoding="UTF-8"?>
<project name="jSS7-WildFly24-Deploy" default="deploy" basedir=".">
<property name="wildfly.home" value="${env.WILDFLY_HOME}"/>
<property name="wildfly.home.check" value="${wildfly.home}/standalone/configuration"/>
<property name="jss7.version" value="9.0.0-318"/>
<property name="sctp.version" value="2.0.2-17"/>
<!-- Module directories -->
<property name="modules.target" value="${basedir}/service/wildfly/modules/target/module"/>
<property name="extension.target" value="${basedir}/service/wildfly/extension/target/module"/>
<property name="commons.target" value="${basedir}/service/wildfly/restcomm-ss7-wildfly-commons/target/module"/>
<property name="wildfly.modules" value="${wildfly.home}/modules"/>
<target name="check-wildfly" unless="wildfly.home">
<fail message="WILDFLY_HOME environment variable is not set. Please set it to your WildFly 24 installation directory."/>
</target>
<target name="check-wildfly-dir" depends="check-wildfly">
<available file="${wildfly.home.check}" type="dir" property="wildfly.exists"/>
<fail unless="wildfly.exists" message="WildFly home directory does not exist or is invalid: ${wildfly.home}"/>
<echo message="WildFly home: ${wildfly.home}"/>
</target>
<target name="clean-deploy" depends="check-wildfly-dir" description="Clean previous jSS7 deployment">
<echo message="Cleaning previous jSS7 deployment..."/>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${wildfly.modules}">
<include name="org/restcomm/ss7/**/*"/>
<include name="org/mobicents/**/*"/>
</fileset>
</delete>
</target>
<target name="deploy-modules" depends="check-wildfly-dir" description="Deploy jSS7 modules to WildFly">
<echo message="Deploying jSS7 modules to WildFly..."/>
<!-- Main SS7 modules -->
<copy todir="${wildfly.modules}/org/restcomm/ss7/main" overwrite="true">
<fileset dir="${modules.target}/main">
<include name="**/*.jar"/>
</fileset>
</copy>
<!-- Copy module.xml for main modules -->
<copy todir="${wildfly.modules}/org/restcomm/ss7/main" overwrite="true">
<fileset dir="${modules.target}/main">
<include name="module.xml"/>
</fileset>
<filterset>
<filter token="project.version" value="${jss7.version}"/>
</filterset>
</copy>
<!-- Extension module -->
<mkdir dir="${wildfly.modules}/org/restcomm/ss7/extension/main"/>
<copy todir="${wildfly.modules}/org/restcomm/ss7/extension/main" overwrite="true">
<fileset dir="${extension.target}/main">
<include name="**/*.jar"/>
</fileset>
</copy>
<copy todir="${wildfly.modules}/org/restcomm/ss7/extension/main" overwrite="true">
<fileset dir="${extension.target}/main">
<include name="module.xml"/>
</fileset>
</copy>
<!-- Commons module -->
<mkdir dir="${wildfly.modules}/org/restcomm/ss7/commons/main"/>
<copy todir="${wildfly.modules}/org/restcomm/ss7/commons/main" overwrite="true">
<fileset dir="${commons.target}/main">
<include name="**/*.jar"/>
</fileset>
</copy>
<copy todir="${wildfly.modules}/org/restcomm/ss7/commons/main" overwrite="true">
<fileset dir="${commons.target}/main">
<include name="module.xml"/>
</fileset>
</copy>
<echo message="jSS7 modules deployed successfully!"/>
</target>
<target name="undeploy" depends="check-wildfly-dir" description="Undeploy jSS7 from WildFly">
<echo message="Undeploying jSS7 from WildFly..."/>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${wildfly.modules}">
<include name="org/restcomm/ss7/**/*"/>
</fileset>
</delete>
<echo message="jSS7 undeployed successfully!"/>
</target>
<target name="list-modules" depends="check-wildfly-dir" description="List deployed jSS7 modules">
<echo message="Listing jSS7 modules in WildFly..."/>
<dirset id="jss7.modules" dir="${wildfly.modules}/org/restcomm" includes="**/*">
<type type="dir"/>
</dirset>
<pathconvert refid="jss7.modules" property="modules.list" pathsep="${line.separator}">
<map from="${wildfly.modules}/org/restcomm/" to=""/>
</pathconvert>
<echo message="Deployed modules:${line.separator}${modules.list}"/>
</target>
<target name="deploy" depends="clean-deploy,deploy-modules" description="Full deploy jSS7 to WildFly 24">
<echo message="jSS7 ${jss7.version} deployed to WildFly successfully!"/>
<echo message="Next steps:"/>
<echo message="1. Edit ${wildfly.home}/standalone/configuration/standalone.xml"/>
<echo message="2. Add the SS7 extension and subsystem"/>
<echo message="3. Start WildFly: ${wildfly.home}/bin/standalone.bat"/>
</target>
<target name="help" description="Show help">
<echo message="jSS7 WildFly 24 Deployment Script"/>
<echo message="================================="/>
<echo message=""/>
<echo message="Prerequisites:"/>
<echo message=" - Set WILDFLY_HOME environment variable to WildFly 24 installation"/>
<echo message=" - Build jSS7 with: mvn clean install -DskipTests"/>
<echo message=""/>
<echo message="Available targets:"/>
<echo message=" ant deploy - Full deploy (clean + deploy modules)"/>
<echo message=" ant deploy-modules- Deploy only (no clean)"/>
<echo message=" ant undeploy - Remove jSS7 from WildFly"/>
<echo message=" ant clean-deploy - Clean previous deployment"/>
<echo message=" ant list-modules - List deployed modules"/>
<echo message=" ant help - Show this help"/>
</target>
</project>