Port champ-microservice project restructure
[aai/champ.git] / champ-service / antBuild / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project>
3         <target name="runLocal">
4                 <java dir="${basedir}" fork="yes" newenvironment="true"
5                         failonerror="true" classname="com.att.ajsc.runner.Runner">
6                         <classpath
7                                 path="${classpath}:${basedir}/ajsc-shared-config/etc:${runAjscHome}/lib/ajsc-runner-${ajscRuntimeVersion}.jar" />
8
9                         <!-- Windows Users may need to add a jvmarg arg to create a temp directory 
10                                 properly. -->
11                         <!-- <jvmarg value="-Djava.io.tmpdir=C:/yourTempDirectory"/> -->
12
13                         <!-- Uncomment the following 2 jvmarg values to enable Remote Debugging. 
14                          -->
15                         <!-- <jvmarg value="-Xdebug" /> -->
16                         <!-- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432" 
17                                 /> -->
18
19                         <jvmarg value="-XX:MaxPermSize=512m" />
20                         <jvmarg value="-Xmx1024m" />
21
22                         <!-- Main ajsc Variables below (Variables necessary for proper startup 
23                                 of AJSC) -->
24                         <env key="AJSC_HOME" value="${runAjscHome}" />
25                         <sysproperty key="AJSC_HOME" value="${runAjscHome}" />
26                         <!-- you may specify any external location for AJSC_CONF_HOME where etc 
27                                 folder & all other configs can be found under it. If not specified, it will 
28                                 default to AJSC_HOME -->
29                         <sysproperty key="AJSC_CONF_HOME" value="${basedir}/bundleconfig-local" />
30                         <sysproperty key="AJSC_SHARED_CONFIG" value="${basedir}/ajsc-shared-config" />
31
32                         <!-- Location of logback.xml file used for logging configurations. Please, 
33                                 note, when deploying a service to either CSI or NON-CSI environment, this 
34                                 system property will be set in sys-props.properties file. We are setting 
35                                 it here for running locally due to the ease of use of maven variable for 
36                                 basedir. -->
37                         <sysproperty key="logback.configurationFile"
38                                 value="${basedir}/ajsc-shared-config/etc/logback.xml" />
39
40                         <!-- Setting system properties for the AJSC external libs and properties 
41                                 folders below. When deploying to a node, these properties will be set within 
42                                 the bundleconfig/etc/sysprops/sys-props.properties file. However, when running 
43                                 locally, the ${basedir} substitution works more efficiently in this manner. -->
44                         <sysproperty key="AJSC_EXTERNAL_LIB_FOLDERS" value="${basedir}/target/commonLibs" />
45                         <sysproperty key="AJSC_EXTERNAL_PROPERTIES_FOLDERS"
46                                 value="${basedir}/ajsc-shared-config/etc" />
47
48                         <!-- End of Main ajsc Variables below (Variables necessary for proper 
49                                 startup of AJSC) -->
50
51                         <!-- Uncomment the following line to add oauthentication to your Service -->
52                         <!-- <sysproperty key="spring.profiles.active" value="oauth" /> -->
53
54                         <!-- If using Cassandra as Database, Enter the ip/host and port below 
55                                 based on your known configuration -->
56                         <!-- <sysproperty key="cassandra.ip" value="hostname" /> -->
57                         <!-- <sysproperty key="cassandra.port" value="9042" /> -->
58
59                         <!-- The APP_SERVLET_URL_PATTERN variable is defaulted to "/services" 
60                                 within the initial configuration of the AJSC. If you are changing the CamelServlet 
61                                 Filter within the ajsc-override-web.xml, you should use that url-pattern 
62                                 here. This is necessary to properly register your service with dme2. An empty 
63                                 value, "", is used when NO value is wanted (url-pattern would be /* for CamelServlet 
64                                 Filter) -->
65                         <!-- As of 4.5.1, this property is no longer needed -->
66                         <!-- <sysproperty key="APP_SERVLET_URL_PATTERN" value="/services" /> -->
67
68                         <!-- GRM/DME2 System Properties below -->
69                         <sysproperty key="AJSC_SERVICE_NAMESPACE" value="${module.ajsc.namespace.name}" />
70                         <sysproperty key="AJSC_SERVICE_VERSION" value="${module.ajsc.namespace.version}" />
71                         <sysproperty key="SOACLOUD_SERVICE_VERSION" value="${project.version}" />
72                         <!-- End of GRM/DME2 System Property Variables -->
73
74                         <!-- The following server.port variable was necessary for the proper registration 
75                                 of the AJSC to dme2. This value may still need to be used if the Developer 
76                                 is hardcoding their port (example: 8080). Then, the server.port value="8080". 
77                                 The default functionality for the AJSC is to use EPHEMERAL ports. In this 
78                                 case, you do NOT need to set the server.port value. The AJSC will find the 
79                                 proper port value and register to dme2 correctly -->
80                         <!-- <sysproperty key="server.port" value="${serverPort}" /> -->
81
82                         <!-- Command Line Arguments to add to the java command. Here, you can 
83                                 specify the port as well as the Context you want your service to run in. 
84                                 Use context=/ to run in an unnamed Context (Root Context). The default configuration 
85                                 of the AJSC is to run under the /ajsc Context. Setting the port here can 
86                                 aid during the development phase of your service. However, you can leave 
87                                 this argument out entirely, and the AJSC will default to using an Ephemeral 
88                                 port. -->
89                         <arg line="context=/ port=${serverPort} sslport=${sslport}" />
90                 </java>
91         </target>
92         <target name="prep_home_directory_for_swm_pkgcreate">
93
94
95                 <!-- These tasks are copying contents from the installHomeDirectory into 
96                         the eventual $AJSC_HOME directory for running locally and soa cloud installation -->
97                 <echo message="ENTERING 'prep_home_directory_for_swm_pkgcreate' ant tasks" />
98
99                 <copy
100                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig"
101                         failonerror="true">
102                         <fileset dir="${basedir}/bundleconfig-local" includes="**/**" />
103                 </copy>
104                 <copy
105                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig/etc"
106                         failonerror="true">
107                         <fileset dir="${basedir}/ajsc-shared-config/etc" includes="**/**" />
108                 </copy>
109                 <!-- End of NON-CSI related build copy task. -->
110
111                 <!-- Copying any zips (deployment packages) to $AJSC_HOME/services for 
112                         auto-deployment -->
113                 <copy
114                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/services"
115                         failonerror="false">
116                         <fileset dir="${basedir}/services" includes="*.zip" />
117                 </copy>
118
119                 <!-- Copying runtimeEnvironment zip file to $AJSC_HOME/runtime and renaming 
120                         runtimeEnvironment.zip for proper auto-deployment of ajsc services. 
121                 <copy
122                         tofile="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/runtime/runtimeEnvironment.zip">
123                         <fileset dir="target" includes="*-runtimeEnvironment.zip" />
124                 </copy>-->
125
126                 <!-- Copying dependencies from the service project (not provided by AJSC 
127                         Container) to the $AJSC_HOME/extJars folder to be accessible on the classpath -->
128                 <copy
129                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extJars"
130                         failonerror="false">
131                         <fileset dir="target/userjars" includes="*" />
132                 </copy>
133
134                 <!-- extApps directory MUST be created for ajsc-runner to run correctly, 
135                         even if empty. DO NOT REMOVE!!! -->
136                 <!-- extApps directory created to deploy other war files on startup or 
137                         hot deploy War files after ajsc starts up. -->
138                 <mkdir
139                         dir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extApps" />
140
141                 <!-- Copying any extra wars to $AJSC_HOME/extApps to be deployed within 
142                         AJSC -->
143                 <copy
144                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extApps"
145                         failonerror="false">
146                         <fileset dir="${basedir}/src/main/resources/extApps"
147                                 includes="*" />
148                 </copy>
149
150                 <!-- staticContent folder is for serving static content within an ajsc 
151                         service. Any static content to be served will be copyied to the ultimate 
152                         $AJSC_HOME/staticContent folder and can be served with the att-static-content 
153                         camel component. -->
154                 <!-- Uncomment the following snippet to copy items from staticContent folder 
155                         to ultimate $AJSC_HOME/staticConent -->
156                 <!-- <copy toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/staticContent" 
157                         failonerror="false"> <fileset dir="${basedir}/staticContent" includes="**/**" 
158                         /> </copy> -->
159
160                 <!-- Copying extra jar files that have been labeled as dependencies in 
161                         service project to /extJars folder to be made available on the classpath 
162                         for your service -->
163                 <copy
164                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extJars"
165                         failonerror="false">
166                         <fileset dir="target" includes="*.jar" />
167                 </copy>
168
169                 <!-- Copying deployment packages created within the project to the $AJSC_HOME/services 
170                         folder to be auto deployed. -->
171                 <copy
172                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/services">
173                         <fileset dir="target" includes="*.zip" excludes="*-runtimeEnvironment.zip" />
174                 </copy>
175
176                 <echo message="EXITING 'prep_assembly_output_for_swm_plugin' ant tasks" />
177         </target>
178 </project>