-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
230 lines (197 loc) · 8.57 KB
/
Copy pathpom.xml
File metadata and controls
230 lines (197 loc) · 8.57 KB
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.meg</groupId>
<artifactId>Shop_Maven_Postgres</artifactId>
<version>1.0-SNAPSHOT</version>
<!--
loads all the default configurations required for the basic spring boot applications.
The parent tag tells Maven that we'd like to use another pom to encapsulate ours i.e inherit various properties and tags from Spring Boot.
Mainly it's there to set things up easily. one of nicest features is that you don't have to include version numbers of Spring Boot libraries in your pom - it will figure them out for you!
-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.3.RELEASE</version>
</parent>
<!--
<properties>
<java.version>1.8</java.version>
<h2.version>1.4.187</h2.version>
</properties>
-->
<properties>
<appengine.app.appId>shop-maven-postgres</appengine.app.appId>
<appengine.app.version>1</appengine.app.version>
<appengine.target.version>1.9.48</appengine.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cloudsql.url>jdbc:google:postgresql://your-instance-name/demo?user=root</cloudsql.url>
<cloudsql.url.dev>jdbc:mysql://localhost/demo?user=root</cloudsql.url.dev>
</properties>
<!--
INSTANCE_CONNECTION_NAME from Cloud Console > SQL > Instance Details > Properties
or `gcloud sql instances describe <instance> | grep connectionName`
-->
<!--
<java.version>1.8</java.version>
<INSTANCE_CONNECTION_NAME>Project:Region:Instance</INSTANCE_CONNECTION_NAME>
<user>root</user>
<password>password</password>
<database>sqldemo</database>
<sqlURL>jdbc:postgresql://google/${database}?useSSL=false&socketFactoryArg=${INSTANCE_CONNECTION_NAME}&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=${user}&password=${password}</sqlURL>
</properties>
-->
<!--dependencies is just a fancy way of telling Maven "Please download these JARs into my project's classpath"-->
<dependencies>
<!--
Spring Boot comes with one-stop-shop package called Starters that include everything you need for a ready-made application
These are what you typically see in the Spring Initialzr with all the dependencies you can wire in
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<!--dd JPA support will download the files required for spring data jpa.-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!--proper database drivers -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4-1206-jdbc42</version>
</dependency>
<!--Add typical dependencies for a web application required because it is web based application to expose the REST endpoints-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Add freemarker template support -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<!-- Add Hikari Connection Pooling support -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</dependency>
<!--H2 database support [for running with local profile]-->
<!--
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
-->
<!--Add MySQL database support [for running with PRODUCTION profile]-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!--The spring-boot-starter-test is the primary dependency that contains the majority of elements required for tests.-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<version>1.5.3.RELEASE</version>
</dependency>
<!--
Security here it goes
Once the spring-boot-starter-security dependency on the classpath of the application – Basic Authentication is enabled by default.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<!---SECURITY -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</dependency>
<!--ACTUATOR-->
<!--Helps you manage and monitor your application-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.8</version>
<scope>provided</scope>
</dependency>
<!--Caching dependencies-->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.7.2</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.7.4.RELEASE</version>
</dependency>
<!--ModelMapper -->
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>0.7.4</version>
</dependency>
<!--
Socket factory for the Postgres JDBC driver that allows a user with the appropriate permissions
to connect to a Cloud SQL database without having to deal with IP whitelisting or SSL certificates manually
-->
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>postgres-socket-factory</artifactId>
<version>1.0.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!--
Include if you want to make an executable jar[FAT JAR which
includes all dependencies along with sprinboot loader] that you can run on
commandline using java -jar NAME
-->
<!--
This makes running your app simple: just type
mvn spring-boot:run
-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!--To develop and deploy your application-->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
</plugin>
<!--To test your application quickly without creating a WAR file, use-->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.7.v20160115</version>
</plugin>
</plugins>
</build>
</project>