1+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
2+ <modelVersion >4.0.0</modelVersion >
3+ <groupId >com.microsoft.webapp.samples</groupId >
4+ <artifactId >Stateful-Tracker</artifactId >
5+ <version >1.0.0-SNAPSHOT</version >
6+ <packaging >war</packaging >
7+
8+ <properties >
9+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
10+ </properties >
11+
12+ <dependencies >
13+ <dependency >
14+ <groupId >javax.servlet</groupId >
15+ <artifactId >javax.servlet-api</artifactId >
16+ <version >4.0.0</version >
17+ <scope >provided</scope >
18+ </dependency >
19+ <dependency >
20+ <groupId >org.apache.logging.log4j</groupId >
21+ <artifactId >log4j-api</artifactId >
22+ <version >2.11.1</version >
23+ </dependency >
24+ <dependency >
25+ <groupId >org.apache.logging.log4j</groupId >
26+ <artifactId >log4j-core</artifactId >
27+ <version >2.11.1</version >
28+ </dependency >
29+ </dependencies >
30+
31+ <build >
32+ <sourceDirectory >src</sourceDirectory >
33+ <plugins >
34+ <plugin >
35+ <artifactId >maven-compiler-plugin</artifactId >
36+ <version >3.8.0</version >
37+ <configuration >
38+ <source >1.8</source >
39+ <target >1.8</target >
40+ </configuration >
41+ </plugin >
42+ <plugin >
43+ <artifactId >maven-war-plugin</artifactId >
44+ <version >3.2.2</version >
45+ <configuration >
46+ <failOnMissingWebXml >false</failOnMissingWebXml >
47+ </configuration >
48+ </plugin >
49+
50+
51+ <!-- *************************************************-->
52+ <!-- Deploy to Tomcat on localhost -->
53+ <!-- *************************************************-->
54+ <!-- <plugin>
55+ <groupId>org.codehaus.cargo</groupId>
56+ <artifactId>cargo-maven2-plugin</artifactId>
57+ <version>1.6.7</version>
58+ <configuration>
59+ <container>
60+ <containerId>tomcat8x</containerId>
61+ <type>installed</type>
62+ <home>${TOMCAT_HOME}</home>
63+ </container>
64+ <configuration>
65+ <type>existing</type>
66+ <home>${TOMCAT_HOME}</home>
67+ </configuration>
68+
69+ <deployables>
70+ <deployable>
71+ <groupId>${project.groupId}</groupId>
72+ <artifactId>${project.artifactId}</artifactId>
73+ <type>war</type>
74+ <properties>
75+ <context>/</context>
76+ </properties>
77+ </deployable>
78+ </deployables>
79+ </configuration>
80+ </plugin>-->
81+
82+ <!-- *************************************************-->
83+ <!-- Deploy to Tomcat on remote machine or VM -->
84+ <!-- *************************************************-->
85+
86+ <plugin >
87+ <groupId >org.codehaus.cargo</groupId >
88+ <artifactId >cargo-maven2-plugin</artifactId >
89+ <version >1.6.7</version >
90+ <configuration >
91+ <container >
92+ <containerId >tomcat8x</containerId >
93+ <type >remote</type >
94+ </container >
95+
96+ <configuration >
97+ <type >runtime</type >
98+ <properties >
99+ <cargo .hostname>${cargo.hostname} </cargo .hostname>
100+ <cargo .servlet.port>${cargo.servlet.port} </cargo .servlet.port>
101+ <cargo .tomcat.manager.url>${cargo.tomcat.manager.url} </cargo .tomcat.manager.url>
102+ <cargo .remote.username>${cargo.remote.username} </cargo .remote.username>
103+ <cargo .remote.password>${cargo.remote.password} </cargo .remote.password>
104+ </properties >
105+ </configuration >
106+
107+ <deployer >
108+ <type >remote</type >
109+ </deployer >
110+
111+ <deployables >
112+ <deployable >
113+ <groupId >${project.groupId} </groupId >
114+ <artifactId >${project.artifactId}</artifactId >
115+ <type >${project.packaging} </type >
116+ </deployable >
117+ </deployables >
118+
119+ </configuration >
120+ </plugin >
121+
122+ <plugin >
123+ <groupId >com.microsoft.azure</groupId >
124+ <artifactId >azure-webapp-maven-plugin</artifactId >
125+ <version >1.5.3</version >
126+ <configuration >
127+
128+ <!-- Web App information -->
129+ <resourceGroup >${RESOURCEGROUP_NAME} </resourceGroup >
130+ <appServicePlanName >${WEBAPP_PLAN_NAME} -${REGION} </appServicePlanName >
131+ <appName >${WEBAPP_NAME} -${REGION} </appName >
132+ <region >${REGION} </region >
133+ <linuxRuntime >tomcat 9.0-jre8</linuxRuntime >
134+
135+ <appSettings >
136+ <property >
137+ <name >REDIS_CACHE_NAME</name >
138+ <value >${REDIS_CACHE_NAME} </value >
139+ </property >
140+ <property >
141+ <name >REDIS_PORT</name >
142+ <value >${REDIS_PORT} </value >
143+ </property >
144+ <property >
145+ <name >REDIS_PASSWORD</name >
146+ <value >${REDIS_PASSWORD} </value >
147+ </property >
148+ <property >
149+ <name >REDIS_SESSION_KEY_PREFIX</name >
150+ <value >${REDIS_SESSION_KEY_PREFIX} </value >
151+ </property >
152+ <property >
153+ <name >JAVA_OPTS</name >
154+ <value >-Xms2048m -Xmx2048m -DREDIS_CACHE_NAME=${REDIS_CACHE_NAME} -DREDIS_PORT=${REDIS_PORT} -DREDIS_PASSWORD=${REDIS_PASSWORD} -DREDIS_SESSION_KEY_PREFIX=${REDIS_SESSION_KEY_PREFIX} </value >
155+ </property >
156+
157+ </appSettings >
158+
159+ </configuration >
160+ </plugin >
161+
162+ </plugins >
163+ </build >
164+
165+ <profiles >
166+ <profile >
167+ <id >env-azure-1</id >
168+ <activation >
169+ <property >
170+ <name >env</name >
171+ <value >azure-1</value >
172+ </property >
173+ </activation >
174+ <properties >
175+ <deploy .env>azure-1</deploy .env>
176+ <cargo .hostname>${AZURE_VM_1_IP_ADDRESS} </cargo .hostname>
177+ <cargo .servlet.port>8080</cargo .servlet.port>
178+ <cargo .tomcat.manager.url>http://${AZURE_VM_1_IP_ADDRESS} :8080/manager</cargo .tomcat.manager.url>
179+ <cargo .remote.username>${AZURE_VM_1_TOMCAT_ADMIN_USERNAME} </cargo .remote.username>
180+ <cargo .remote.password>${AZURE_VM_1_TOMCAT_ADMIN_PASSWORD} </cargo .remote.password>
181+ </properties >
182+ </profile >
183+ <profile >
184+ <id >env-azure-2</id >
185+ <activation >
186+ <property >
187+ <name >env</name >
188+ <value >azure-2</value >
189+ </property >
190+ </activation >
191+ <properties >
192+ <deploy .env>azure</deploy .env>
193+ <cargo .hostname>${AZURE_VM_2_IP_ADDRESS} </cargo .hostname>
194+ <cargo .servlet.port>8080</cargo .servlet.port>
195+ <cargo .tomcat.manager.url>http://${AZURE_VM_1_IP_ADDRESS} :8080/manager</cargo .tomcat.manager.url>
196+ <cargo .remote.username>${AZURE_VM_2_TOMCAT_ADMIN_USERNAME} </cargo .remote.username>
197+ <cargo .remote.password>${AZURE_VM_2_TOMCAT_ADMIN_PASSWORD} </cargo .remote.password>
198+ </properties >
199+ </profile >
200+
201+ <profile >
202+ <id >env-local</id >
203+ <activation >
204+ <property >
205+ <name >env</name >
206+ <value >local</value >
207+ </property >
208+ </activation >
209+ <properties >
210+ <deploy .env>local</deploy .env>
211+ <cargo .hostname>localhost</cargo .hostname>
212+ <cargo .servlet.port>8080</cargo .servlet.port>
213+ <cargo .tomcat.manager.url>http://localhost:8080/manager</cargo .tomcat.manager.url>
214+ <cargo .remote.username>admin</cargo .remote.username>
215+ <cargo .remote.password>admin</cargo .remote.password>
216+ </properties >
217+ </profile >
218+ </profiles >
219+
220+ </project >
0 commit comments