pom.xml 13.7 KB
Newer Older
1
2
3
4
5
6
<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>

  <parent>
    <groupId>net.sumaris</groupId>
    <artifactId>sumaris-pod</artifactId>
LAVENIER's avatar
LAVENIER committed
7
    <version>1.10.1</version>
8
9
  </parent>

LAVENIER's avatar
LAVENIER committed
10
  <artifactId>sumaris-server</artifactId>
11
  <packaging>war</packaging>
12
13
14
15
16
  <name>SUMARiS:: Server</name>
  <description>SUMARiS server</description>

  <properties>
    <!-- i18n configuration -->
17
    <i18n.bundleOutputName>sumaris-server-i18n</i18n.bundleOutputName>
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
    <i18n.generateCsvFile>true</i18n.generateCsvFile>
    <i18n.bundleCsvFile>
      ${project.build.directory}/generated-sources/resources/META-INF/${i18n.bundleOutputName}.csv
    </i18n.bundleCsvFile>
    <config.i18nBundleName>${i18n.bundleOutputName}</config.i18nBundleName>

    <!-- bundle configuration -->
    <bundlePrefix>sumarie-server-${project.version}</bundlePrefix>
    <bundle.jvmArgs>-server -Xms512m -Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=50
      -XX:+ScavengeBeforeFullGC -XX:+CMSScavengeBeforeRemark
    </bundle.jvmArgs>

    <!-- Unit test -->
    <jetty.port>8080</jetty.port>
    <jetty.reload>manual</jetty.reload>
    <synchro-server.config>${project.basedir}/src/test/resources/sumaris-server-test.properties</synchro-server.config>
34
    <sumaris.log.file>${project.build.directory}/${bundlePrefix}.log</sumaris.log.file>
35
36

    <!-- Default implementation -->
LAVENIER's avatar
LAVENIER committed
37
    <spring.datasource.platform>hsqldb</spring.datasource.platform>
38
    <jdbc.url>jdbc:hsqldb:file:data/db/sumaris</jdbc.url>
39
    <server.address>localhost</server.address>
40
    <server.port>8080</server.port>
41
    <server.url>http://${server.address}:${server.port}</server.url>
42
    <server.account.register.confirm.url>${server.url}/api/confirmEmail/?email={email}&amp;code={code}</server.account.register.confirm.url>
43
    <admin.email>admin@locahost</admin.email>
44

45
    <maven.jar.main.class>net.sumaris.server.Application</maven.jar.main.class>
46

47
    <kotlin.version>1.3.70</kotlin.version>
LAVENIER's avatar
LAVENIER committed
48
  </properties>
49
50
51
52
53
54
55
56
57
58
59
60
61
62

  <dependencies>

    <!-- Project dependencies -->
    <dependency>
      <groupId>net.sumaris</groupId>
      <artifactId>sumaris-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>net.sumaris</groupId>
      <artifactId>sumaris-core-extraction</artifactId>
      <version>${project.version}</version>
    </dependency>
LAVENIER's avatar
LAVENIER committed
63
64
65
66
67
    <dependency>
      <groupId>net.sumaris</groupId>
      <artifactId>sumaris-core-rdf</artifactId>
      <version>${project.version}</version>
    </dependency>
68
69
70
71
72
73
74
75
76
77
78
79
80
81

    <!-- API dependencies -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
82
83
84
85

    <!-- TODO change packaging to 'war', and change tomcat to 'provided' (see below)
         See https://dzone.com/articles/build-a-spring-boot-app-and-deploy-into-tomcat -->
    <dependency>
86
87
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
88
      <version>${spring-boot.version}</version>
89
      <scope>provided</scope>
90
91
    </dependency>

92
    <!-- Spring boot -->
93
94
95
96
97
98
99
100
    <dependency>
      <groupId>it.ozimov</groupId>
      <artifactId>spring-boot-email-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-websocket</artifactId>
    </dependency>
LAVENIER's avatar
LAVENIER committed
101
102
103
104
105
106
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>

    <!-- Security -->
107
108
109
110
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
LAVENIER's avatar
LAVENIER committed
111
112
113
114
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-ldap</artifactId>
    </dependency>
115
116

    <!-- ActiveMQ -->
117
    <dependency>
118
119
120
121
122
123
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-activemq</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-kahadb-store</artifactId>
124
    </dependency>
125
126
127
    <dependency>
      <groupId>io.reactivex.rxjava2</groupId>
      <artifactId>rxjava</artifactId>
128
    </dependency>
LAVENIER's avatar
LAVENIER committed
129
130
131
132
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jms</artifactId>
    </dependency>
133
134
135
136
137
138
139

    <!-- GraphQL -->
    <dependency>
      <groupId>com.graphql-java</groupId>
      <artifactId>graphql-java</artifactId>
    </dependency>
    <dependency>
140
      <groupId>com.graphql-java-kickstart</groupId>
141
142
143
      <artifactId>graphql-java-tools</artifactId>
    </dependency>
    <dependency>
144
145
146
147
148
      <groupId>com.graphql-java-kickstart</groupId>
      <artifactId>graphiql-spring-boot-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>com.graphql-java-kickstart</groupId>
149
150
151
152
153
154
      <artifactId>graphql-java-servlet</artifactId>
    </dependency>
    <dependency>
      <groupId>io.leangen.graphql</groupId>
      <artifactId>spqr</artifactId>
    </dependency>
155
156
157
158
    <dependency>
      <groupId>de.grundid.opendatalab</groupId>
      <artifactId>geojson-jackson</artifactId>
    </dependency>
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>2.3.0</version>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-core</artifactId>
      <version>2.3.0</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>${logback.version}</version>
    </dependency>
178

179
180
181
182
    <!-- Database drivers -->
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
183
      <scope>provided</scope>
184
185
186
187
    </dependency>
    <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc8</artifactId>
188
      <scope>provided</scope>
189
190
    </dependency>

191
    <!-- Provided -->
LAVENIER's avatar
LAVENIER committed
192
    <dependency>
193
194
195
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>provided</scope>
LAVENIER's avatar
LAVENIER committed
196
    </dependency>
197
198

    <!-- Compile -->
LAVENIER's avatar
LAVENIER committed
199
    <dependency>
200
201
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
LAVENIER's avatar
LAVENIER committed
202
    </dependency>
203
204
205
206
    <dependency>
      <groupId>org.nuiton.i18n</groupId>
      <artifactId>nuiton-i18n</artifactId>
    </dependency>
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224

    <!-- Unit test -->
    <dependency>
      <groupId>net.sumaris</groupId>
      <artifactId>sumaris-test-shared</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
LAVENIER's avatar
LAVENIER committed
225
226
227
228
229
230
231
232
233
234
    <dependency>
      <groupId>com.graphql-java-kickstart</groupId>
      <artifactId>graphql-spring-boot-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.unboundid</groupId>
      <artifactId>unboundid-ldapsdk</artifactId>
      <scope>test</scope>
    </dependency>
235
236
237
238

  </dependencies>

  <build>
LAVENIER's avatar
LAVENIER committed
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
    <!-- Turn on filtering by default for application properties -->
    <resources>
      <resource>
        <directory>src/main/filtered-resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>*.config</include>
          <include>**/*.properties</include>
          <include>**/*.xml</include>
          <include>**/*.yml</include>
          <include>**/*.yaml</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>**/*.*</include>
        </includes>
      </resource>
      <resource>
        <directory>target/generated-sources/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>**/*.*</include>
        </includes>
      </resource>
    </resources>

    <plugins>
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
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${javaVersion}</source>
          <target>${javaVersion}</target>
          <compilerArgument>-parameters</compilerArgument>
          <testCompilerArgument>-parameters</testCompilerArgument>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.nuiton.i18n</groupId>
        <artifactId>i18n-maven-plugin</artifactId>

        <executions>
          <execution>
            <id>scan-sources</id>
            <configuration>
              <entries>
                <entry>
                  <specificGoal>parserValidation</specificGoal>
                  <basedir>${maven.src.dir}/main/java/</basedir>
                  <includes>
                    <param>**/**-validation.xml</param>
                  </includes>
                </entry>
              </entries>
            </configuration>
            <goals>
              <goal>parserJava</goal>
              <goal>parserValidation</goal>
              <goal>gen</goal>
            </goals>
          </execution>
          <execution>
            <id>make-bundle</id>
            <goals>
              <goal>bundle</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

315
316
317
318
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
      </plugin>

319
320
321
322
323
324
325
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <mainClass>${maven.jar.main.class}</mainClass>
        </configuration>
        <executions>
LAVENIER's avatar
LAVENIER committed
326
327
328
329
330
331
332
          <execution>
            <id>generate-build-info</id>
            <goals>
              <goal>build-info</goal>
            </goals>
          </execution>

333
          <execution>
LAVENIER's avatar
LAVENIER committed
334
            <id>package-executable-war</id>
335
336
337
338
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
LAVENIER's avatar
LAVENIER committed
339

340
341
342
343
344
345
346
347
348
349
350
351
352
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <delimiters>
            <delimiter>@</delimiter>
          </delimiters>
          <useDefaultDelimiters>false</useDefaultDelimiters>
        </configuration>
      </plugin>
353

354
355
356
357
358
359
360
361
362
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>hsqldb</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
LAVENIER's avatar
LAVENIER committed
363
          <name>spring.datasource.platform</name>
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
          <value>hsqldb</value>
        </property>
      </activation>

      <properties>
        <jdbc.url>jdbc:hsqldb:hsql://localhost/sumaris</jdbc.url>
      </properties>

    </profile>

    <profile>
      <id>bundles</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

383
384
385
386
387
388
389
390
      <build>
        <defaultGoal>package</defaultGoal>
        <plugins>

          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
LAVENIER's avatar
LAVENIER committed
391
                <id>assembly-zip</id>
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <attach>true</attach>
                  <descriptors>
                    <descriptor>
                      src/main/assembly/standalone.xml
                    </descriptor>
                  </descriptors>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
409
410
    </profile>

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
    <!-- use this profile to run the main class -->
    <profile>
      <id>run</id>
      <build>
        <defaultGoal>compile</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>${execPluginVersion}</version>
            <configuration>
              <!-- Disable exec plugin (will use spring-boot:rnu)  -->
              <skip>true</skip>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>${spring-boot-plugin.version}</version>
            <executions>
              <execution>
                <id>run</id>
                <goals>
                  <goal>run</goal>
                </goals>
                <phase>compile</phase>
                <configuration>
                  <jvmArguments>${exec.jvmArgs}</jvmArguments>
                  <arguments>${exec.args}</arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>

      <properties>
        <exec.mainClass>${maven.jar.main.class}</exec.mainClass>
        <exec.args></exec.args>
        <exec.jvmArgs>-Duser.timezone=UTC -Dspring.main.banner-mode=off</exec.jvmArgs>
      </properties>
    </profile>
454
455
456
  </profiles>

</project>