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