aboutsummaryrefslogtreecommitdiffstats
path: root/champ-service/antBuild/build.xml
blob: b898a9e77c79d3e75687bf383c490fa7c76e07a2 (plain)
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?xml version="1.0" encoding="UTF-8"?>
<project>
	<target name="runLocal">
		<java dir="${basedir}" fork="yes" newenvironment="true"
			failonerror="true" classname="com.att.ajsc.runner.Runner">
			<classpath
				path="${classpath}:${basedir}/ajsc-shared-config/etc:${runAjscHome}/lib/ajsc-runner-${ajscRuntimeVersion}.jar" />

			<!-- Windows Users may need to add a jvmarg arg to create a temp directory 
				properly. -->
			<!-- <jvmarg value="-Djava.io.tmpdir=C:/yourTempDirectory"/> -->

			<!-- Uncomment the following 2 jvmarg values to enable Remote Debugging. 
			 -->
			<!-- <jvmarg value="-Xdebug" /> -->
			<!-- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432" 
				/> -->

			<jvmarg value="-XX:MaxPermSize=512m" />
			<jvmarg value="-Xmx1024m" />

			<!-- Main ajsc Variables below (Variables necessary for proper startup 
				of AJSC) -->
			<env key="AJSC_HOME" value="${runAjscHome}" />
			<sysproperty key="AJSC_HOME" value="${runAjscHome}" />
			<!-- you may specify any external location for AJSC_CONF_HOME where etc 
				folder & all other configs can be found under it. If not specified, it will 
				default to AJSC_HOME -->
			<sysproperty key="AJSC_CONF_HOME" value="${basedir}/bundleconfig-local" />
			<sysproperty key="AJSC_SHARED_CONFIG" value="${basedir}/ajsc-shared-config" />

			<!-- Location of logback.xml file used for logging configurations. Please, 
				note, when deploying a service to either CSI or NON-CSI environment, this 
				system property will be set in sys-props.properties file. We are setting 
				it here for running locally due to the ease of use of maven variable for 
				basedir. -->
			<sysproperty key="logback.configurationFile"
				value="${basedir}/ajsc-shared-config/etc/logback.xml" />

			<!-- Setting system properties for the AJSC external libs and properties 
				folders below. When deploying to a node, these properties will be set within 
				the bundleconfig/etc/sysprops/sys-props.properties file. However, when running 
				locally, the ${basedir} substitution works more efficiently in this manner. -->
			<sysproperty key="AJSC_EXTERNAL_LIB_FOLDERS" value="${basedir}/target/commonLibs" />
			<sysproperty key="AJSC_EXTERNAL_PROPERTIES_FOLDERS"
				value="${basedir}/ajsc-shared-config/etc" />

			<!-- End of Main ajsc Variables below (Variables necessary for proper 
				startup of AJSC) -->

			<!-- Uncomment the following line to add oauthentication to your Service -->
			<!-- <sysproperty key="spring.profiles.active" value="oauth" /> -->

			<!-- If using Cassandra as Database, Enter the ip/host and port below 
				based on your known configuration -->
			<!-- <sysproperty key="cassandra.ip" value="hostname" /> -->
			<!-- <sysproperty key="cassandra.port" value="9042" /> -->

			<!-- The APP_SERVLET_URL_PATTERN variable is defaulted to "/services" 
				within the initial configuration of the AJSC. If you are changing the CamelServlet 
				Filter within the ajsc-override-web.xml, you should use that url-pattern 
				here. This is necessary to properly register your service with dme2. An empty 
				value, "", is used when NO value is wanted (url-pattern would be /* for CamelServlet 
				Filter) -->
			<!-- As of 4.5.1, this property is no longer needed -->
			<!-- <sysproperty key="APP_SERVLET_URL_PATTERN" value="/services" /> -->

			<!-- GRM/DME2 System Properties below -->
			<sysproperty key="AJSC_SERVICE_NAMESPACE" value="${module.ajsc.namespace.name}" />
			<sysproperty key="AJSC_SERVICE_VERSION" value="${module.ajsc.namespace.version}" />
			<sysproperty key="SOACLOUD_SERVICE_VERSION" value="${project.version}" />
			<!-- End of GRM/DME2 System Property Variables -->

			<!-- The following server.port variable was necessary for the proper registration 
				of the AJSC to dme2. This value may still need to be used if the Developer 
				is hardcoding their port (example: 8080). Then, the server.port value="8080". 
				The default functionality for the AJSC is to use EPHEMERAL ports. In this 
				case, you do NOT need to set the server.port value. The AJSC will find the 
				proper port value and register to dme2 correctly -->
			<!-- <sysproperty key="server.port" value="${serverPort}" /> -->

			<!-- Command Line Arguments to add to the java command. Here, you can 
				specify the port as well as the Context you want your service to run in. 
				Use context=/ to run in an unnamed Context (Root Context). The default configuration 
				of the AJSC is to run under the /ajsc Context. Setting the port here can 
				aid during the development phase of your service. However, you can leave 
				this argument out entirely, and the AJSC will default to using an Ephemeral 
				port. -->
			<arg line="context=/ port=${serverPort} sslport=${sslport}" />
		</java>
	</target>
	<target name="prep_home_directory_for_swm_pkgcreate">


		<!-- These tasks are copying contents from the installHomeDirectory into 
			the eventual $AJSC_HOME directory for running locally and soa cloud installation -->
		<echo message="ENTERING 'prep_home_directory_for_swm_pkgcreate' ant tasks" />

		<copy
			toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig"
			failonerror="true">
			<fileset dir="${basedir}/bundleconfig-local" includes="**/**" />
		</copy>
		<copy
			toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/bundleconfig/etc"
			failonerror="true">
			<fileset dir="${basedir}/ajsc-shared-config/etc" includes="**/**" />
		</copy>
		<!-- End of NON-CSI related build copy task. -->

		<!-- Copying any zips (deployment packages) to $AJSC_HOME/services for 
			auto-deployment -->
		<copy
			toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/services"
			failonerror="false">
			<fileset dir="${basedir}/services" includes="*.zip" />
		</copy>

		<!-- Copying runtimeEnvironment zip file to $AJSC_HOME/runtime and renaming 
			runtimeEnvironment.zip for proper auto-deployment of ajsc services. 
		<copy
			tofile="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/runtime/runtimeEnvironment.zip">
			<fileset dir="target" includes="*-runtimeEnvironment.zip" />
		</copy>-->

		<!-- Copying dependencies from the service project (not provided by AJSC 
			Container) to the $AJSC_HOME/extJars folder to be accessible on the classpath -->
		<copy
			toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extJars"
			failonerror="false">
			<fileset dir="target/userjars" includes="*" />
		</copy>

		<!-- extApps directory MUST be created for ajsc-runner to run correctly, 
			even if empty. DO NOT REMOVE!!! -->
		<!-- extApps directory created to deploy other war files on startup or 
			hot deploy War files after ajsc starts up. -->
		<mkdir
			dir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extApps" />

		<!-- Copying any extra wars to $AJSC_HOME/extApps to be deployed within 
			AJSC -->
		<copy
			toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extApps"
			failonerror="false">
			<fileset dir="${basedir}/src/main/resources/extApps"
				includes="*" />
		</copy>

		<!-- staticContent folder is for serving static content within an ajsc 
			service. Any static content to be served will be copyied to the ultimate 
			$AJSC_HOME/staticContent folder and can be served with the att-static-content 
			camel component. -->
		<!-- Uncomment the following snippet to copy items from staticContent folder 
			to ultimate $AJSC_HOME/staticConent -->
		<!-- <copy toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/staticContent" 
			failonerror="false"> <fileset dir="${basedir}/staticContent" includes="**/**" 
			/> </copy> -->

		<!-- Copying extra jar files that have been labeled as dependencies in 
			service project to /extJars folder to be made available on the classpath 
			for your service -->
		<copy
			toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/extJars"
			failonerror="false">
			<fileset dir="target" includes="*.jar" />
		</copy>

		<!-- Copying deployment packages created within the project to the $AJSC_HOME/services 
			folder to be auto deployed. -->
		<copy
			toDir="${basedir}/target/swm/package/nix/dist_files${distFilesRoot}/services">
			<fileset dir="target" includes="*.zip" excludes="*-runtimeEnvironment.zip" />
		</copy>

		<echo message="EXITING 'prep_assembly_output_for_swm_plugin' ant tasks" />
	</target>
</project>