1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START==========================================
5 ===================================================================
6 Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
7 Copyright © 2017-2018 Amdocs
8 ===================================================================
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20 ============LICENSE_END============================================
23 <target name="runLocal">
24 <java dir="${basedir}" fork="yes" newenvironment="true"
25 failonerror="true" classname="com.att.ajsc.runner.Runner">
27 path="${classpath}:${basedir}/ajsc-shared-config/etc:${runAjscHome}/lib/ajsc-runner-${ajscRuntimeVersion}.jar" />
29 <!-- Windows Users may need to add a jvmarg arg to create a temp directory
31 <!-- <jvmarg value="-Djava.io.tmpdir=C:/yourTempDirectory"/> -->
33 <!-- Uncomment the following 2 jvmarg values to enable Remote Debugging.
35 <!-- <jvmarg value="-Xdebug" /> -->
36 <!-- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432"
39 <jvmarg value="-XX:MaxPermSize=512m" />
40 <jvmarg value="-Xmx1024m" />
42 <!-- Main ajsc Variables below (Variables necessary for proper startup
44 <env key="AJSC_HOME" value="${runAjscHome}" />
45 <sysproperty key="AJSC_HOME" value="${runAjscHome}" />
46 <!-- you may specify any external location for AJSC_CONF_HOME where etc
47 folder & all other configs can be found under it. If not specified, it will
48 default to AJSC_HOME -->
49 <sysproperty key="AJSC_CONF_HOME" value="${basedir}/bundleconfig-local" />
50 <sysproperty key="AJSC_SHARED_CONFIG" value="${basedir}/ajsc-shared-config" />
52 <!-- Location of logback.xml file used for logging configurations. Please,
53 note, when deploying a service to either CSI or NON-CSI environment, this
54 system property will be set in sys-props.properties file. We are setting
55 it here for running locally due to the ease of use of maven variable for
57 <sysproperty key="logback.configurationFile"
58 value="${basedir}/ajsc-shared-config/etc/logback.xml" />
60 <!-- Setting system properties for the AJSC external libs and properties
61 folders below. When deploying to a node, these properties will be set within
62 the bundleconfig/etc/sysprops/sys-props.properties file. However, when running
63 locally, the ${basedir} substitution works more efficiently in this manner. -->
64 <sysproperty key="AJSC_EXTERNAL_LIB_FOLDERS" value="${basedir}/target/commonLibs" />
65 <sysproperty key="AJSC_EXTERNAL_PROPERTIES_FOLDERS"
66 value="${basedir}/ajsc-shared-config/etc" />
68 <!-- End of Main ajsc Variables below (Variables necessary for proper
71 <!-- Uncomment the following line to add oauthentication to your Service -->
72 <!-- <sysproperty key="spring.profiles.active" value="oauth" /> -->
74 <!-- If using Cassandra as Database, Enter the ip/host and port below
75 based on your known configuration -->
76 <!-- <sysproperty key="cassandra.ip" value="hostname" /> -->
77 <!-- <sysproperty key="cassandra.port" value="9042" /> -->
79 <!-- The APP_SERVLET_URL_PATTERN variable is defaulted to "/services"
80 within the initial configuration of the AJSC. If you are changing the CamelServlet
81 Filter within the ajsc-override-web.xml, you should use that url-pattern
82 here. This is necessary to properly register your service with dme2. An empty
83 value, "", is used when NO value is wanted (url-pattern would be /* for CamelServlet
85 <!-- As of 4.5.1, this property is no longer needed -->
86 <!-- <sysproperty key="APP_SERVLET_URL_PATTERN" value="/services" /> -->
88 <!-- GRM/DME2 System Properties below -->
89 <sysproperty key="AJSC_SERVICE_NAMESPACE" value="${module.ajsc.namespace.name}" />
90 <sysproperty key="AJSC_SERVICE_VERSION" value="${module.ajsc.namespace.version}" />
91 <sysproperty key="SOACLOUD_SERVICE_VERSION" value="${project.version}" />
92 <!-- End of GRM/DME2 System Property Variables -->
94 <!-- The following server.port variable was necessary for the proper registration
95 of the AJSC to dme2. This value may still need to be used if the Developer
96 is hardcoding their port (example: 8080). Then, the server.port value="8080".
97 The default functionality for the AJSC is to use EPHEMERAL ports. In this
98 case, you do NOT need to set the server.port value. The AJSC will find the
99 proper port value and register to dme2 correctly -->
100 <!-- <sysproperty key="server.port" value="${serverPort}" /> -->
102 <!-- Command Line Arguments to add to the java command. Here, you can
103 specify the port as well as the Context you want your service to run in.
104 Use context=/ to run in an unnamed Context (Root Context). The default configuration
105 of the AJSC is to run under the /ajsc Context. Setting the port here can
106 aid during the development phase of your service. However, you can leave
107 this argument out entirely, and the AJSC will default to using an Ephemeral
109 <arg line="context=/ port=${serverPort} sslport=${sslport}" />
112 <target name="prep_home_directory_for_swm_pkgcreate">
114 <!-- ********* GENERATE CADI KEY AND ENCRYPTED PASSWORD ***********
116 Uncomment the following if your cadi key get corrupted , It would
117 generate the Cadi key and password in the package phase and keep the key
118 in the 'src/main/config/ajscKey' and password in the bottom of cadi.properties(you
119 need to modify the 'aaf_pass' variable with this value . Plese modify the
120 template.cadi.properties as well before uploading to SOA node
124 <java jar="${basedir}/target/userjars/cadi-core-1.2.5.jar" fork="true">
125 <arg value="keygen" /> <arg value="src/main/config/ajscKey" />
128 <echo>***Cadi Key file generated ****</echo>
130 <java jar="${basedir}/target/userjars/cadi-core-1.2.5.jar"
131 fork="true" append="true" output="${basedir}/src/main/config/cadi.properties">
132 <arg value="digest" /> <arg value="ajscRocks!" /> <arg value="src/main/config/ajscKey"
140 <!-- These tasks are copying contents from the installHomeDirectory into
141 the eventual $AJSC_HOME directory for running locally and soa cloud installation -->
142 <echo message="ENTERING 'prep_home_directory_for_swm_pkgcreate' ant tasks" />
144 <!-- Please, NOTE: The ajsc-archetype is setup for a default CSI Env deployment.
145 If you are deploying to a CSI Env, you should NOT have to change anything
146 within this build file. However, if you are NOT deploying to a CSI Env, you
147 should comment OUT the CSI related portion of this build.xml. -->
149 <!-- The following code snippet is copying the bundleconfig-csi directory
150 to the proper installation/bundleconfig directory used in CSI envs. If you
151 are NOT installing to a CSI node, you should comment out (or delete) the
152 following snippet, and uncomment the NON-CSI copy task to copy EVERYTHING
153 to the installation/bundleconfig directory. -->
155 <!-- CSI related bundleconfig copy task. If you are NOT deploying to a
156 CSI Env, please COMMENT OUT or delete the following copy task code snippet. -->
157 <!--<copy toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig"
158 failonerror="true"> <fileset dir="${basedir}/bundleconfig-csi" /> </copy> -->
159 <!-- End of CSI related bundleconfig copy task -->
161 <!-- NOTE: If you are NOT deploying to CSI environment, and you are NOT
162 using an AJSC_SHARED_CONFIG location on a node, you should go ahead and copy
163 EVERYTHING from bundleconfig and ajsc-shared-config (logback.xml) directory
164 to utilize proper logging from logback.xml. Simply, uncomment the following
165 code snippet below to copy EVERYTHING and comment out the CSI related build
167 <!-- NON-CSI related build copy task. Please, uncomment the following code
168 snippet to deploy the proper artifacts to a NON-CSI Env. -->
170 toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig"
172 <fileset dir="${basedir}/bundleconfig-local" includes="**/**" />
175 toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig/etc"
177 <fileset dir="${basedir}/ajsc-shared-config/etc" includes="**/**" />
179 <!-- End of NON-CSI related build copy task. -->
181 <!-- Copying any zips (deployment packages) to $AJSC_HOME/services for
184 toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/services"
186 <fileset dir="${basedir}/services" includes="*.zip" />
189 <!-- Copying runtimeEnvironment zip file to $AJSC_HOME/runtime and renaming
190 runtimeEnvironment.zip for proper auto-deployment of ajsc services.
192 tofile="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/runtime/runtimeEnvironment.zip">
193 <fileset dir="target" includes="*-runtimeEnvironment.zip" />
196 <!-- Copying dependencies from the service project (not provided by AJSC
197 Container) to the $AJSC_HOME/extJars folder to be accessible on the classpath -->
199 toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extJars"
201 <fileset dir="target/userjars" includes="*" />
204 <!-- extApps directory MUST be created for ajsc-runner to run correctly,
205 even if empty. DO NOT REMOVE!!! -->
206 <!-- extApps directory created to deploy other war files on startup or
207 hot deploy War files after ajsc starts up. -->
209 dir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extApps" />
211 <!-- Copying any extra wars to $AJSC_HOME/extApps to be deployed within
214 toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extApps"
216 <fileset dir="${basedir}/src/main/resources/extApps"
220 <!-- staticContent folder is for serving static content within an ajsc
221 service. Any static content to be served will be copyied to the ultimate
222 $AJSC_HOME/staticContent folder and can be served with the att-static-content
224 <!-- Uncomment the following snippet to copy items from staticContent folder
225 to ultimate $AJSC_HOME/staticConent -->
226 <!-- <copy toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/staticContent"
227 failonerror="false"> <fileset dir="${basedir}/staticContent" includes="**/**"
230 <!-- Copying extra jar files that have been labeled as dependencies in
231 service project to /extJars folder to be made available on the classpath
234 toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extJars"
236 <fileset dir="target" includes="*.jar" />
239 <!-- Copying deployment packages created within the project to the $AJSC_HOME/services
240 folder to be auto deployed. -->
242 toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/services">
243 <fileset dir="target" includes="*.zip" excludes="*-runtimeEnvironment.zip" />
246 <echo message="EXITING 'prep_assembly_output_for_swm_plugin' ant tasks" />