Remove diffutils dependency
[aai/traversal.git] / aai-traversal / 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 <!-- ********* GENERATE CADI KEY AND ENCRYPTED PASSWORD ***********
95      
96             Uncomment the following if your cadi key get corrupted , It would 
97                         generate the Cadi key and password in the package phase and keep the key 
98                         in the 'src/main/config/ajscKey' and password in the bottom of cadi.properties(you 
99                         need to modify the 'aaf_pass' variable with this value . Plese modify the 
100                         template.cadi.properties as well before uploading to SOA node 
101 -->
102
103 <!-- 
104                 <java jar="${basedir}/target/userjars/cadi-core-1.2.5.jar" fork="true"> 
105                 <arg value="keygen" /> <arg value="src/main/config/ajscKey" /> 
106                 </java> 
107                 
108                 <echo>***Cadi Key file generated ****</echo> 
109                 
110                 <java jar="${basedir}/target/userjars/cadi-core-1.2.5.jar" 
111                 fork="true" append="true" output="${basedir}/src/main/config/cadi.properties"> 
112                 <arg value="digest" /> <arg value="ajscRocks!" /> <arg value="src/main/config/ajscKey" 
113                 /> 
114                 </java> 
115                 
116 -->
117
118
119
120                 <!-- These tasks are copying contents from the installHomeDirectory into 
121                         the eventual $AJSC_HOME directory for running locally and soa cloud installation -->
122                 <echo message="ENTERING 'prep_home_directory_for_swm_pkgcreate' ant tasks" />
123
124                 <!-- Please, NOTE: The ajsc-archetype is setup for a default CSI Env deployment. 
125                         If you are deploying to a CSI Env, you should NOT have to change anything 
126                         within this build file. However, if you are NOT deploying to a CSI Env, you 
127                         should comment OUT the CSI related portion of this build.xml. -->
128
129                 <!-- The following code snippet is copying the bundleconfig-csi directory 
130                         to the proper installation/bundleconfig directory used in CSI envs. If you 
131                         are NOT installing to a CSI node, you should comment out (or delete) the 
132                         following snippet, and uncomment the NON-CSI copy task to copy EVERYTHING 
133                         to the installation/bundleconfig directory. -->
134
135                 <!-- CSI related bundleconfig copy task. If you are NOT deploying to a 
136                         CSI Env, please COMMENT OUT or delete the following copy task code snippet. -->
137                 <!--<copy toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig" 
138                         failonerror="true"> <fileset dir="${basedir}/bundleconfig-csi" /> </copy> -->
139                 <!-- End of CSI related bundleconfig copy task -->
140
141                 <!-- NOTE: If you are NOT deploying to CSI environment, and you are NOT 
142                         using an AJSC_SHARED_CONFIG location on a node, you should go ahead and copy 
143                         EVERYTHING from bundleconfig and ajsc-shared-config (logback.xml) directory 
144                         to utilize proper logging from logback.xml. Simply, uncomment the following 
145                         code snippet below to copy EVERYTHING and comment out the CSI related build 
146                         script above. -->
147                 <!-- NON-CSI related build copy task. Please, uncomment the following code 
148                         snippet to deploy the proper artifacts to a NON-CSI Env. -->
149                  <copy
150                                 toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig"
151                                 failonerror="true">
152                                 <fileset dir="${basedir}/bundleconfig-local" includes="**/**" />
153                         </copy>
154                 <copy
155                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig/etc"
156                         failonerror="true">
157                                 <fileset dir="${basedir}/ajsc-shared-config/etc" includes="**/**" />
158                         </copy> 
159                 <!-- End of NON-CSI related build copy task. -->
160
161                 <!-- Copying any zips (deployment packages) to $AJSC_HOME/services for 
162                         auto-deployment -->
163                 <copy
164                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/services"
165                         failonerror="false">
166                         <fileset dir="${basedir}/services" includes="*.zip" />
167                 </copy>
168
169                 <!-- Copying runtimeEnvironment zip file to $AJSC_HOME/runtime and renaming 
170                         runtimeEnvironment.zip for proper auto-deployment of ajsc services. -->
171                 <!--               <copy
172                         tofile="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/runtime/runtimeEnvironment.zip">
173                         <fileset dir="target" includes="*-runtimeEnvironment.zip" />
174                 </copy>
175 -->
176                 <!-- Copying dependencies from the service project (not provided by AJSC 
177                         Container) to the $AJSC_HOME/extJars folder to be accessible on the classpath -->
178                 <copy
179                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extJars"
180                         failonerror="false">
181                         <fileset dir="target/userjars" includes="*" />
182                 </copy>
183
184                 <!-- extApps directory MUST be created for ajsc-runner to run correctly, 
185                         even if empty. DO NOT REMOVE!!! -->
186                 <!-- extApps directory created to deploy other war files on startup or 
187                         hot deploy War files after ajsc starts up. -->
188                 <mkdir
189                         dir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extApps" />
190
191                 <!-- Copying any extra wars to $AJSC_HOME/extApps to be deployed within 
192                         AJSC -->
193                 <copy
194                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extApps"
195                         failonerror="false">
196                         <fileset dir="${basedir}/src/main/resources/extApps"
197                                 includes="*" />
198                 </copy>
199
200                 <!-- staticContent folder is for serving static content within an ajsc 
201                         service. Any static content to be served will be copyied to the ultimate 
202                         $AJSC_HOME/staticContent folder and can be served with the  
203                         camel component. -->
204                 <!-- Uncomment the following snippet to copy items from staticContent folder 
205                         to ultimate $AJSC_HOME/staticConent -->
206                 <!-- <copy toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/staticContent" 
207                         failonerror="false"> <fileset dir="${basedir}/staticContent" includes="**/**" 
208                         /> </copy> -->
209
210                 <!-- Copying extra jar files that have been labeled as dependencies in 
211                         service project to /extJars folder to be made available on the classpath 
212                         for your service -->
213                 <copy
214                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extJars"
215                         failonerror="false">
216                         <fileset dir="target" includes="*.jar" />
217                 </copy>
218
219                 <!-- Copying deployment packages created within the project to the $AJSC_HOME/services 
220                         folder to be auto deployed. -->
221                 <copy
222                         toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/services">
223                         <fileset dir="target" includes="*.zip" excludes="*-runtimeEnvironment.zip" />
224                 </copy>
225
226                 <echo message="EXITING 'prep_assembly_output_for_swm_plugin' ant tasks" />
227         </target>
228 </project>