<property environment="sys"/>
<property name="release.dir" location="${ant.file.ss7.release.sf}/../target"/>
<property name="base.dir" location="${ant.file.ss7.release.sf}/.."/>
<property name="checkout.asn.dir" value="${base.dir}/checkout/asn"/>
<property name="checkout.sctp.dir" value="${base.dir}/checkout/sctp"/>
<property name="restcomm.jss7.dist" value="${release.dir}/restcomm-jss7-dist"/>
<property name="jss7.addon" value="${release.dir}/jss7-addon"/>
<property name="jss7.dir" value="${base.dir}/.."/>
<property name="docs.dir" location="${restcomm.jss7.dist}/_docs"/>
<property name="checkout.dir" value="${base.dir}/checkout" />
<!--Versions -->
<property name="asn.version" value="2.2.0-143"/>
<property name="sctp.version" value="2.0.0-166"/>
<property name="release.version" value="${jSS7.release.version}"/>
<property name="checkout.asn.version" value="2.2.0-22"/>
<property name="checkout.sctp.version" value="2.0.0-39"/>
<property name="jasn.download.distro.file" value="restcomm-jasn-${asn.version}.zip" />
<property name="jasn.download.url" value="${github.url}/jasn/releases/download/${asn.version}/${jasn.download.distro.file}" />
<property name="jasn.distro.zip.path" value="${checkout.dir}/${jasn.download.distro.file}" />
<property name="sctp.download.distro.file" value="restcomm-sctp-${sctp.version}.zip" />
<property name="sctp.download.url" value="${github.url}/sctp/releases/download/${sctp.version}/${sctp.download.distro.file}" />
<property name="sctp.distro.zip.path" value="${checkout.dir}/${sctp.download.distro.file}" />
<condition property="mvn.executable" value="${sys.M2_HOME}\bin\mvn.bat" else="mvn">
<os family="windows"/>
</condition>
<taskdef onerror="fail" resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${ant.file.ss7.release.sf}/../ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<target name="release"
depends="clean,get-deps,extract-deps,build-jss7,build-docs,copy-asn,copy-sctp,copy-jss7,copy-documentation,make-final-zip"/>
<target name="release-restcomm"
depends="clean,get-deps,extract-deps,build-docs,copy-asn,copy-sctp,copy-jss7,copy-documentation,make-final-zip"/>
<target name="get-deps" depends="get-asn,get-sctp" />
<target name="extract-deps" depends="extract-asn,extract-sctp" />
<!-- Build dependencies-->
<target name="build-asn">
<echo>Building ASN</echo>
<exec failonerror="true" executable="${mvn.executable}" dir="${base.dir}">
<arg line="-version"/>
</exec>
<exec failonerror="true" executable="git">
<arg value="clone"/>
<arg value="-b"/>
<arg value="${checkout.asn.version}"/>
<arg value="${checkout.asn.dir}"/>
</exec>
<exec failonerror="true" executable="${mvn.executable}" dir="${checkout.asn.dir}">
<arg line="clean install -Dmaven.test.skip=true -Pall"/>
</exec>
</target>
<target name="get-asn" unless="got.asn">
<echo>Downloading RestComm JASN version: ${asn.version}</echo>
<exec failonerror="true" executable="wget">
<arg value="${jasn.download.url}" />
<arg value="--output-document=${jasn.download.distro.file}" />
<arg value="--no-check-certificate" />
</exec>
<move file="${base.dir}/${jasn.download.distro.file}" todir="${checkout.dir}"/>
</target>
<target name="extract-asn" depends="get-asn">
<delete dir="${checkout.asn.dir}" failonerror="false" />
<unzip src="${jasn.distro.zip.path}" dest="${checkout.asn.dir}"/>
<move file="${checkout.asn.dir}/jasn-${asn.version}-restcomm" tofile="${checkout.asn.dir}/jasn-${asn.version}" failonerror="false"/>
</target>
<target name="get-sctp" unless="got.sctp">
<echo>Downloading RestComm SCTP version: ${sctp.version}</echo>
<exec failonerror="true" executable="wget">
<arg value="${sctp.download.url}" />
<arg value="--output-document=${sctp.download.distro.file}" />
<arg value="--no-check-certificate" />
</exec>
<move file="${base.dir}/${sctp.download.distro.file}" todir="${checkout.dir}"/>
</target>
<target name="extract-sctp" depends="get-sctp">
<delete dir="${checkout.sctp.dir}" failonerror="false" />
<unzip src="${sctp.distro.zip.path}" dest="${checkout.sctp.dir}"/>
<move file="${checkout.sctp.dir}/sctp-${sctp.version}-restcomm" tofile="${checkout.asn.dir}/sctp-${sctp.version}" failonerror="false"/>
</target>
<target name="build-sctp">
<echo>Building SCTP</echo>
<exec failonerror="true" executable="git">
<arg value="clone"/>
<arg value="-b"/>
<arg value="${checkout.sctp.version}"/>
<arg value="${checkout.sctp.dir}"/>
</exec>
<exec failonerror="true" executable="${mvn.executable}" dir="${checkout.sctp.dir}">
<arg line="clean install -Dmaven.test.skip=true -Prelease,all"/>
</exec>
</target>
<target name="copy-asn">
<echo>Copy ASN</echo>
<copy todir="${restcomm.jss7.dist}/asn/" failonerror="true">
<fileset dir="${checkout.asn.dir}/restcomm-jasn-${asn.version}">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="copy-sctp">
<echo>Copy SCTP</echo>
<copy todir="${restcomm.jss7.dist}/sctp/" failonerror="true">
<fileset dir="${checkout.sctp.dir}/restcomm-sctp-${sctp.version}">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="copy-jss7">
<echo>Copy SS7 Simulator</echo>
<copy todir="${restcomm.jss7.dist}/ss7/restcomm-ss7-simulator" failonerror="true">
<fileset dir="${jss7.dir}/tools/simulator/bootstrap/target/simulator-ss7">
<include name="**"/>
</fileset>
</copy>
<!--
<echo>Copy SS7 - SWG</echo>
<copy todir="${restcomm.jss7.dist}/ss7/restcomm-ss7-sgw" failonerror="true">
<fileset dir="${jss7.dir}/sgw/boot/target/restcomm-sgw">
<include name="**"/>
</fileset>
</copy>
-->
<!-- echo>Copy SS7 native libs</echo>
<copy todir="${restcomm.jss7.dist}/ss7/native" failonerror="true">
<fileset dir="${jss7.dir}/sgw/boot/target/restcomm-sgw/native">
<include name="**" />
</fileset>
</copy -->
<echo>Copy Protocols</echo>
<copy todir="${restcomm.jss7.dist}/ss7/protocols" failonerror="true">
<fileset dir="${jss7.dir}/tcap/tcap-api/target/">
<include name="*.jar"/>
</fileset>
<fileset dir="${jss7.dir}/tcap/tcap-impl/target/">
<include name="*.jar"/>
</fileset>
<fileset dir="${jss7.dir}/map/map-api/target/">
<include name="*.jar"/>
</fileset>
<fileset dir="${jss7.dir}/map/map-impl/target/">
<include name="*.jar"/>
</fileset>
<fileset dir="${jss7.dir}/cap/cap-api/target/">
<include name="*.jar"/>
</fileset>
<fileset dir="${jss7.dir}/cap/cap-impl/target/">
<include name="*.jar"/>
</fileset>
<fileset dir="${jss7.dir}/isup/isup-api/target/">
<include name="*.jar"/>
</fileset>
<fileset dir="${jss7.dir}/isup/isup-impl/target/">
<include name="*.jar"/>
</fileset>
<fileset dir="${jss7.dir}/inap/inap-api/target/">
<include name="*.jar"/>
</fileset>
<fileset dir="${jss7.dir}/inap/inap-impl/target/">
<include name="*.jar"/>
</fileset>
</copy>
<echo>Copy Parser</echo>
<copy todir="${restcomm.jss7.dist}/ss7/restcomm-ss7-traceparser" failonerror="true">
<fileset dir="${jss7.dir}/tools/trace-parser/bootstrap/target/traceparser-ss7">
<include name="**"/>
</fileset>
</copy>
<echo>Copy Shell</echo>
<copy todir="${restcomm.jss7.dist}/ss7/shell/lib" failonerror="true">
<fileset dir="${jss7.dir}/management/shell-client/target/restcomm-cli/lib">
<include name="**"/>
</fileset>
</copy>
<copy todir="${restcomm.jss7.dist}/ss7/shell/bin" failonerror="true">
<fileset dir="${jss7.dir}/management/shell-client/target/restcomm-cli/bin">
<include name="**"/>
</fileset>
</copy>
<!--
<copy file="${jss7.dir}/hardware/cli/target/linkset-cli.jar" todir="${restcomm.jss7.dist}/ss7/shell/lib"
failonerror="true"/>
-->
<copy file="${jss7.dir}/m3ua/cli/m3ua/target/m3ua-cli-m3ua.jar" todir="${restcomm.jss7.dist}/ss7/shell/lib"
failonerror="true"/>
<copy file="${jss7.dir}/m3ua/cli/sctp/target/m3ua-cli-sctp.jar" todir="${restcomm.jss7.dist}/ss7/shell/lib"
failonerror="true"/>
<copy file="${jss7.dir}/sccp/sccp-cli/target/sccp-cli.jar" todir="${restcomm.jss7.dist}/ss7/shell/lib"
failonerror="true"/>
<copy file="${jss7.dir}/tcap/tcap-cli/target/tcap-cli.jar" todir="${restcomm.jss7.dist}/ss7/shell/lib"
failonerror="true"/>
<copy file="${jss7.dir}/tcap-ansi/tcap-ansi-cli/target/tcap-ansi-cli.jar"
todir="${restcomm.jss7.dist}/ss7/shell/lib" failonerror="true"/>
<!-- Copy files for deploying/undeployng jSS7 to JBoss 5 and WildFly -->
<!--
<copy file="${jss7.dir}/release/release-build-jboss5.xml" tofile="${restcomm.jss7.dist}/ss7-jboss/build.xml"
failonerror="true"/>
-->
<copy file="${jss7.dir}/release/release-build-wildfly.xml" tofile="${restcomm.jss7.dist}/ss7-wildfly/build.xml"
failonerror="true"/>
<copy file="${jss7.dir}/release/wildfly-jss7-subsystem.txt" tofile="${restcomm.jss7.dist}/ss7-wildfly/template/wildfly-jss7-subsystem.txt"
failonerror="true"/>
<copy file="${jss7.dir}/release/security-domains.txt" tofile="${restcomm.jss7.dist}/ss7-wildfly/template/security-domains.txt"
failonerror="true"/>
<copy file="${jss7.dir}/release/deployment_manual.txt" tofile="${restcomm.jss7.dist}/ss7-wildfly/deployment_manual.txt"
failonerror="true"/>
<copy file="${jss7.dir}/release/jmx-roles.properties" tofile="${restcomm.jss7.dist}/ss7-wildfly/template/jmx-roles.properties"
failonerror="true"/>
<copy file="${jss7.dir}/release/jmx-users.properties" tofile="${restcomm.jss7.dist}/ss7-wildfly/template/jmx-users.properties"
failonerror="true"/>
<copy file="${jss7.dir}/release/xmltask.jar" tofile="${restcomm.jss7.dist}/ss7-wildfly/xmltask.jar"
failonerror="true"/>
<copy file="${jss7.dir}/release/ss7-logging-subsystem.txt" tofile="${restcomm.jss7.dist}/ss7-wildfly/template/ss7-logging-subsystem.txt"
failonerror="true"/>
<!-- Copy templates for JBoss 5 -->
<!--
<copy todir="${restcomm.jss7.dist}/ss7-jboss/template/META-INF-dialogic/" failonerror="true">
<fileset dir="${jss7.dir}/service/jboss/src/main/config-dialogic">
<include name="**"/>
</fileset>
</copy>
<copy todir="${restcomm.jss7.dist}/ss7-jboss/template/META-INF-m3ua-dialogic/" failonerror="true">
<fileset dir="${jss7.dir}/service/jboss/src/main/config-m3ua-dialogic">
<include name="**"/>
</fileset>
</copy>
<copy todir="${restcomm.jss7.dist}/ss7-jboss/template/log4j/" failonerror="true">
<fileset dir="${jss7.dir}/service/jboss/src/main/log4j">
<include name="**" />
</fileset>
</copy>
-->
<!-- Copy RestComm SS7 Service for JBoss 5 -->
<!--
<copy todir="${restcomm.jss7.dist}/ss7-jboss/restcomm-ss7-service" failonerror="true">
<fileset dir="${jss7.dir}/service/jboss/target/restcomm-ss7-service">
<include name="**"/>
</fileset>
</copy>
-->
<!-- Copy RestComm SS7 Service for WildFly -->
<copy todir="${restcomm.jss7.dist}/ss7-wildfly/restcomm-ss7-service/extension" failonerror="true">
<fileset dir="${jss7.dir}/service/wildfly/extension/target/module">
<include name="**"/>
</fileset>
</copy>
<copy todir="${restcomm.jss7.dist}/ss7-wildfly/restcomm-ss7-service/modules" failonerror="true">
<fileset dir="${jss7.dir}/service/wildfly/modules/target/module">
<include name="**"/>
</fileset>
</copy>
<copy todir="${restcomm.jss7.dist}/ss7-wildfly/restcomm-ss7-service/commons" failonerror="true">
<fileset dir="${jss7.dir}/service/wildfly/restcomm-ss7-wildfly-commons/target/module">
<include name="**"/>
</fileset>
</copy>
<!--
<echo>Copy OAM ui</echo>
<copy todir="${restcomm.jss7.dist}/oam/new-ui" failonerror="true">
<fileset dir="${jss7.dir}/oam/new-ui/target/">
<include name="*.war"/>
</fileset>
</copy>
<echo>Copy Modified Jolokia War</echo>
<copy file="./jolokia.war" todir="${restcomm.jss7.dist}/oam/new-ui" failonerror="true"/>
-->
</target>
<target name="build-jss7">
<exec failonerror="true" executable="${mvn.executable}" dir="${base.dir}/../">
<arg line="clean install -Dmaven.test.skip=true"/>
</exec>
</target>
<target name="build-docs">
<exec failonerror="true" executable="${mvn.executable}" dir="${base.dir}/../docs">
<arg line="clean install -Prestcomm -Pall"/>
</exec>
</target>
<target name="make-final-zip" depends="set-time-stamp">
<zip destfile="${base.dir}/restcomm-jss7-${release.version}.zip" filesonly="false">
<zipfileset dir="${restcomm.jss7.dist}" prefix="restcomm-jss7-${release.version}">
<include name="**"/>
</zipfileset>
</zip>
</target>
<target name="set-time-stamp" unless="skip.timestamp">
<tstamp>
<format property="time.stamp" pattern="yyMMddHHmm"/>
</tstamp>
</target>
<target name="copy-documentation">
<echo>copying documentation</echo>
<mkdir dir="${docs.dir}"/>
<mkdir dir="${docs.dir}/ASNLibrary"/>
<copy todir="${docs.dir}/ASNLibrary/html-book" failonerror="true">
<fileset dir="${checkout.asn.dir}/restcomm-jasn-${asn.version}/documentation/html-book/">
<include name="**"/>
</fileset>
</copy>
<mkdir dir="${docs.dir}/ASNLibrary/pdf"/>
<copy todir="${docs.dir}/ASNLibrary/pdf" failonerror="true">
<fileset dir="${checkout.asn.dir}/restcomm-jasn-${asn.version}/documentation/pdf/">
<include name="**.pdf"/>
</fileset>
</copy>
<mkdir dir="${docs.dir}/SCTPLibrary"/>
<mkdir dir="${docs.dir}/SCTPLibrary/html-book"/>
<copy todir="${docs.dir}/SCTPLibrary/html-book" failonerror="true">
<fileset dir="${checkout.sctp.dir}/restcomm-sctp-${sctp.version}/documentation/html-book/">
<include name="**"/>
</fileset>
</copy>
<mkdir dir="${docs.dir}/SCTPLibrary/pdf"/>
<copy todir="${docs.dir}/SCTPLibrary/pdf" failonerror="true">
<fileset dir="${checkout.sctp.dir}/restcomm-sctp-${sctp.version}/documentation/pdf/">
<include name="**.pdf"/>
</fileset>
</copy>
<mkdir dir="${docs.dir}/userguide"/>
<mkdir dir="${docs.dir}/installationguide"/>
<mkdir dir="${docs.dir}/userguide/html-book"/>
<copy todir="${docs.dir}/userguide/html-book" failonerror="true">
<fileset dir="${jss7.dir}/docs/userguide/sources-asciidoc/target/generated-docs/html-book/">
<include name="**"/>
</fileset>
</copy>
<mkdir dir="${docs.dir}/installationguide/html-book"/>
<copy todir="${docs.dir}/installationguide/html-book" failonerror="true">
<fileset dir="${jss7.dir}/docs/installationguide/sources-asciidoc/target/generated-docs/html-book/">
<include name="**"/>
</fileset>
</copy>
<mkdir dir="${docs.dir}/userguide/pdf"/>
<copy todir="${docs.dir}/userguide/pdf" failonerror="true">
<fileset dir="${jss7.dir}/docs/userguide/sources-asciidoc/target/generated-docs/pdf/">
<include name="**.pdf"/>
</fileset>
</copy>
<mkdir dir="${docs.dir}/installationguide/pdf"/>
<copy todir="${docs.dir}/installationguide/pdf" failonerror="true">
<fileset dir="${jss7.dir}/docs/installationguide/sources-asciidoc/target/generated-docs/pdf/">
<include name="**.pdf"/>
</fileset>
</copy>
<!--
<copy todir="${docs.dir}" failonerror="true">
<fileset dir="${jss7.dir}/docs/userguide/jdocbook-restcomm/target/docbook/publish/en-US/pdf">
<include name="*.pdf" />
</fileset>
</copy
<copy todir="${docs.dir}" failonerror="true">
<fileset dir="${jss7.dir}/docs/releasenotes/jdocbook-restcomm/target/docbook/publish/en-US/pdf">
<include name="*.pdf" />
</fileset>
</copy>
copy todir="${docs.dir}" failonerror="true">
<fileset dir="${jss7.dir}/docs/installationguide/jdocbook-restcomm/target/docbook/publish/en-US/pdf">
<include name="*.pdf" />
</fileset>
</copy>
-->
</target>
<target name="clean">
<delete dir="${release.dir}"/>
<delete dir="${base.dir}/checkout"/>
<delete>
<fileset dir="${base.dir}">
<include name="restcomm-jss7-*.*" />
</fileset>
</delete>
</target>
</project>
בתאריך יום שלישי, 19 בפברואר 2019 בשעה 14:28:59 UTC+2, מאת Ibrahima Gaye: