forked from cryptobuks/quantizr-open-source-Social-Media
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
456 lines (401 loc) · 13.7 KB
/
Copy pathpom.xml
File metadata and controls
456 lines (401 loc) · 13.7 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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
<?xml version="1.0" encoding="UTF-8"?>
<!-- There are 4 profiles: DEV,PROD,DEV-VSCODE -->
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>quanta</groupId>
<artifactId>quanta</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Quanta</name>
<description>Quanta - Content Platform for the Web</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<!--
Tip: When upgrading this verison it's a good ideal to blow away
the '.m2' hidden folder on your machine (maven cache) and also
enable this line in build.sh: "mvn dependency:sources", so you get
all new source AND remove all the old stuff.
WARNING: This version number is in BOTH pom files!
-->
<version>2.7.3</version>
<relativePath />
</parent>
<!-- ========== DEV PROFILE BEGIN ========== -->
<profiles>
<profile>
<id>dev</id>
<activation>
<!-- Prior to 4/5/2019 we had this profile as the default and the 'dev-vscode'
profile didn't exist (below), for
more info on why there is dev and dev-vscode profiles see the long comment below that is
above the dev-vscode profile.
-->
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>quanta.AppServer</start-class>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>quanta</groupId>
<artifactId>common</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<filters>
<filter>src/main/resources/application.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>public/node_modules/**</exclude>
<exclude>server/node_modules/**</exclude>
<exclude>quanta-common/node_modules/**</exclude>
<exclude>public/node/**</exclude>
</excludes>
<!-- I have resource filtering disabled for now because i don't need it, but
if you turn it back on don't forget
to add 'resources:resources' to the maven command for inside<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>9</source>
<target>9</target>
</configuration>
</plugin> VSCode AND also your prod builder shell script!!!
<filtering>true</filtering>
-->
</resource>
</resources>
<plugins>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
<packaging>jar</packaging>
<file>${project.basedir}/jar/validation-api-1.1.0.Final.jar</file>
<generatePom>true</generatePom>
</configuration>
<executions>
<execution>
<id>install-jar-lib</id>
<goals>
<goal>install-file</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
-->
<!-- uncomment this to start generating javadocs. -->
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<reportOutputDirectory>./JavaDocs</reportOutputDirectory>
<destDir>JavaDocs</destDir>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin> -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<layout>ZIP</layout>
</configuration>
</plugin>
<!--
WARNING: It appears that only ONE exec-maven-plugin runs. Having two of these plugins won't work,
because it ends up
only running one of them. Don't know why. So just put ALL scripting stuff in this one file
-->
</plugins>
</build>
</profile>
<!--
This profile is for the purpose of updating /target/classes only so we can do a rapid server
reload/iteration
========== JAVA-COMPILE PROFILE BEGIN ========== -->
<profile>
<id>java-compile</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>quanta.AppServer</start-class>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>quanta</groupId>
<artifactId>common</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- <configuration>
<layout>ZIP</layout>
</configuration> -->
</plugin>
</plugins>
</build>
</profile>
<!-- ========== DEV-VSCODE PROFILE BEGIN ========== -->
<!-- This profile 'dev-vscode' is the one we activate by default so that when opening in
VSCode we don't run into the
bug that exists where 'node' process will HANG forever with maxed out CPU usage. This profile is
identical to the 'dev'
profile except for omitting the webpack part which causes this bug/hang. All profiles work just
fine with or without
webpack when run on the command line, but it seems VSCode is not able to run any webpack without
this bug happening, so the
solution is just that we never run any webpack from inside VSCode
Interestingly, this bug only happens then VSCode is automatically running the the build behind the
scenes just because you
opened the project and it wants to run a build. Running from a tasks.json entry that runs
'./build.sh', from the Terminal
menu inside VSCode works just fine.
UPDATE: There ended up being an additional need for this profile to the above, which is the fact
that it can compile the Java
and run the typescript-generator-maven-plugin to generate the generated TypeScript Interfaces,
without WebPack trying to run first
which can potentially have outdated (old) generated file, and fail.
-->
<profile>
<id>dev-vscode</id>
<activation>
<!-- I think i added this 'default' designation so that IDEs can build always even
when no specific build config is being run
Update: I set this activeByDefaut to 'false' on 4/6/2019, because I noticed the webpack process was
hanging up in 'node' somehow,
and the 'node' process in linux was sitting ther burning up 155% CPU forever, in a loop. This stops
VSCode from causing this to happen.
Somehow there is a bug in that scenario. VSCode detecting this and trying to run a build once you
just merely open your IDE.
-->
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>quanta.AppServer</start-class>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>quanta</groupId>
<artifactId>common</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<filters>
<filter>src/main/resources/application.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>public/node_modules/**</exclude>
<exclude>server/node_modules/**</exclude>
<exclude>quanta-common/node_modules/**</exclude>
<exclude>public/node/**</exclude>
</excludes>
<!-- I have resource filtering disabled for now because i don't need it, but
if you turn it back on don't forget
to add 'resources:resources' to the maven command for inside<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>9</source>
<target>9</target>
</configuration>
</plugin> VSCode AND also your prod builder shell script!!!
<filtering>true</filtering>
-->
</resource>
</resources>
<plugins>
<plugin>
<groupId>cz.habarta.typescript-generator</groupId>
<artifactId>typescript-generator-maven-plugin</artifactId>
<version>3.2.1263</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<optionalAnnotations>
<annotation>javax.annotation.Nullable</annotation>
</optionalAnnotations>
<jsonLibrary>jackson2</jsonLibrary>
<!-- Supposedly this will allow @JsonProperty(required = false) in the
java to put a '?' after the param
but unfortunately it doesn't default to 'true' as one would expect, so for now I'll leave it out
to get maximal typesafety
<optionalProperties>useLibraryDefinition</optionalProperties>
-->
<classPatterns>
<pattern>quanta.model.client.**</pattern>
<pattern>quanta.request.**</pattern>
<pattern>quanta.response.**</pattern>
</classPatterns>
<outputKind>module</outputKind>
<outputFile>src/main/resources/public/ts/JavaIntf.ts</outputFile>
<outputFileType>implementationFile</outputFileType>
<!-- <mapClasses>asClasses</mapClasses>
<nonConstEnums>true</nonConstEnums>
<optionalProperties>useLibraryDefinition</optionalProperties>-->
<mapEnum>asEnum</mapEnum>
<jackson2Configuration>
<enumsUsingToString>true</enumsUsingToString>
</jackson2Configuration>
<noFileComment>true</noFileComment>
</configuration>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
<packaging>jar</packaging>
<file>${project.basedir}/jar/validation-api-1.1.0.Final.jar</file>
<generatePom>true</generatePom>
</configuration>
<executions>
<execution>
<id>install-jar-lib</id>
<goals>
<goal>install-file</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!--
WARNING: It appears that only ONE exec-maven-plugin runs. Having two of these plugins won't work,
because it ends up
only running one of them. Don't know why. So just put ALL scripting stuff in this one file
-->
</plugins>
</build>
</profile>
<!-- ========== PROD PROFILE BEGIN ========== -->
<profile>
<id>prod</id>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>quanta.AppServer</start-class>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>quanta</groupId>
<artifactId>common</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<filters>
<filter>src/main/resources/application.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>public/node_modules/**</exclude>
<exclude>server/node_modules/**</exclude>
<exclude>quanta-common/node_modules/**</exclude>
<exclude>public/node/**</exclude>
</excludes>
<!-- I have resource filtering disabled for now because i don't need it, but
if you turn it back on don't forget
to add 'resources:resources' to the maven command for inside VSCode AND also your prod builder
shell script!!!
<filtering>true</filtering>
-->
</resource>
</resources>
<plugins>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
<packaging>jar</packaging>
<file>${project.basedir}/jar/validation-api-1.1.0.Final.jar</file>
<generatePom>true</generatePom>
</configuration>
<executions>
<execution>
<id>install-jar-lib</id>
<goals>
<goal>install-file</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!--
WARNING: It appears that only ONE exec-maven-plugin runs. Having two of these plugins won't work,
because it ends up
only running one of them. Don't know why. So just put ALL scripting stuff in this one file
-->
</plugins>
</build>
</profile>
</profiles>
</project>