forked from OndraZizka/csv-cruncher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
402 lines (362 loc) · 21 KB
/
pom.xml
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
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ch.zizka.csvcruncher</groupId>
<artifactId>csv-cruncher</artifactId>
<version>2.4.2-SNAPSHOT</version>
<name>CsvCruncher</name>
<description>Treats CSV or JSON files as SQL tables, and exports SQL SELECTs back to CSV or JSON.</description>
<url>https://github.com/OndraZizka/csv-cruncher</url>
<licenses><license><name>The Apache Software License, Version 2.0</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution></license></licenses>
<developers><developer><name>Ondrej Zizka</name><email>zizka@seznam.cz</email></developer></developers>
<issueManagement><system>GitHub Issues</system><url>https://github.com/OndraZizka/csv-cruncher/issues</url></issueManagement>
<scm>
<url>https://github.com/OndraZizka/csv-cruncher</url>
<developerConnection>scm:git:git@github.com:OndraZizka/csv-cruncher.git</developerConnection>
<tag>csv-cruncher-2.4.1</tag>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.kotlin>1.7.21</version.kotlin>
<version.kotlin-dokka>1.7.20</version.kotlin-dokka>
<version.jdk>11</version.jdk>
<version.jackson>2.14.1</version.jackson>
<version.surefire>3.0.0-M7</version.surefire>
<jvm.args.debug /> <!-- Used by the -Pdebug profile. -->
<mainClass>Crunch</mainClass>
<testRunCmd>${jvm.args.debug} -jar ${project.build.directory}/${project.build.finalName}-single.jar</testRunCmd>
<skipE2E>false</skipE2E>
<ossrh.host>oss.sonatype.org</ossrh.host>
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
</properties>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<resources>
<!--
<resource> <directory>src/main/kotlin</directory> <excludes><exclude>*.java</exclude><exclude>*.kt</exclude></excludes> </resource>
-->
<resource><directory>src/main/resources</directory></resource>
<resource><directory>./</directory><includes><include>README.md</include></includes></resource>
</resources>
<testResources>
<testResource><directory>src/test/kotlin</directory><excludes><exclude>*.java</exclude><exclude>*.kt</exclude></excludes></testResource>
</testResources>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><version>3.3.0</version>
<configuration><includes><include>**/*.class</include><exclude>**/*.kt</exclude></includes></configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId><version>3.0.0</version>
<executions>
<execution>
<phase>generate-test-resources</phase>
<goals><goal>run</goal></goals>
<configuration><target><unzip src="src/test/data/json/github_data.zip" dest="target/testData/json/" /></target></configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.surefire}</version>
<configuration>
<trimStackTrace>false</trimStackTrace>
<systemPropertyVariables>
<test.data.dir>${project.build.testSourceDirectory}/../data</test.data.dir>
<target.dir>${project.build.directory}</target.dir>
<textdb.allow_full_path>true</textdb.allow_full_path>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.surefire}</version>
<configuration>
<trimStackTrace>false</trimStackTrace>
<systemPropertyVariables>
<test.cruncher.runCmd>${testRunCmd}</test.cruncher.runCmd>
<test.data.dir>${project.build.testSourceDirectory}/../data</test.data.dir>
<target.dir>${project.build.directory}</target.dir>
<textdb.allow_full_path>true</textdb.allow_full_path>
</systemPropertyVariables>
</configuration>
<executions>
<execution><id>it</id><goals><goal>integration-test</goal></goals></execution>
<execution><id>ve</id><goals><goal>verify</goal></goals></execution>
</executions>
</plugin>
<!-- Better - uses the Assembly plugin with built-in jar-with-dependencies descriptor.
mvn install assembly:assembly
-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<executions>
<execution>
<id>assembleDistJar</id>
<goals><goal>single</goal></goals>
<phase>package</phase>
<configuration>
<finalName>${project.artifactId}-${project.version}-single</finalName>
<archive>
<manifest>
<mainClass>${mainClass}</mainClass>
<addClasspath>false</addClasspath> <!-- false for jar-with-dependencies -->
<classpathPrefix>lib/</classpathPrefix>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Release-Version>${project.version}</Release-Version>
</manifestEntries>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
<execution>
<id>assembleDistZip</id>
<goals><goal>single</goal></goals>
<phase>package</phase>
<configuration>
<finalName>${project.artifactId}-${project.version}-dist</finalName>
<archive>
<manifest>
<mainClass>${mainClass}</mainClass>
<addClasspath>false</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
<descriptors>
<descriptor>src/main/assembly-dist.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</plugin>
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><version>3.3.0</version></plugin>
<!-- One real execution of the tool from outside JUnit. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>testCrunch-simple</id>
<phase>integration-test</phase>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${skipE2E}</skip>
<executable>java</executable>
<commandlineArgs>
${testRunCmd}
--json=entries
--rowNumbers
--logLevel=INFO
-in src/test/data/eapBuilds.csv
-out target/results/result.csv
-sql 'SELECT jobName, buildNumber, config, ar, arFile, deployDur, warmupDur, scale,
CAST(warmupDur AS DOUBLE) / CAST(deployDur AS DOUBLE) AS warmupSlower
FROM eapBuilds ORDER BY deployDur'
</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals><goal>enforce</goal></goals>
<configuration>
<rules>
<requireMavenVersion><version>3.8.1</version></requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${version.kotlin}</version>
<executions>
<execution>
<id>compile</id><phase>compile</phase><goals><goal>compile</goal></goals>
<configuration>
<jvmTarget>${version.jdk}</jvmTarget>
<sourceDirs><sourceDir>src/main/kotlin</sourceDir></sourceDirs>
</configuration>
</execution>
<execution><id>test-compile</id><phase>test-compile</phase><goals><goal>test-compile</goal></goals></execution>
</executions>
</plugin>
<!-- Maven Compiler plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<executions>
<!-- Short-circuit the special treatment of default-compile executions. See https://kotlinlang.org/docs/reference/using-maven.html -->
<execution><id>default-compile</id><phase>none</phase></execution>
<execution><id>default-testCompile</id><phase>none</phase></execution>
</executions>
<inherited>true</inherited>
<configuration>
<source>${version.jdk}</source>
<target>${version.jdk}</target>
<optimize>true</optimize>
<debug>true</debug>
<encoding>utf-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<!-- Saxon 9 not found in maven repos. -->
<groupId>net.sf.saxon</groupId>
<artifactId>saxon</artifactId>
<version>8.7</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency><groupId>org.jetbrains.kotlin</groupId><artifactId>kotlin-stdlib-jdk8</artifactId><version>${version.kotlin}</version></dependency>
<dependency><groupId>org.jetbrains.kotlin</groupId><artifactId>kotlin-reflect</artifactId><version>${version.kotlin}</version></dependency>
<dependency><groupId>org.hsqldb</groupId><artifactId>hsqldb</artifactId><version>2.7.1</version></dependency>
<dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId><version>3.12.0</version></dependency>
<dependency><groupId>commons-io</groupId><artifactId>commons-io</artifactId><version>2.11.0</version></dependency>
<!-- Just for the JSON encoding. 355 kB.
<dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.11</version> </dependency>
-->
<!-- Just for the JSON encoding. 16 kB. -->
<!-- Not used now, as we use javax.json, see below.
<dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> <version>1.1</version> </dependency>
-->
<dependency><groupId>javax.json</groupId><artifactId>javax.json-api</artifactId><version>1.1.4</version></dependency>
<dependency><groupId>org.glassfish</groupId><artifactId>javax.json</artifactId><version>1.1.4</version></dependency>
<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>${version.jackson}</version></dependency>
<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>${version.jackson}</version></dependency>
<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId><version>${version.jackson}</version></dependency>
<dependency><groupId>com.fasterxml.jackson.module</groupId><artifactId>jackson-module-kotlin</artifactId><version>${version.jackson}</version></dependency>
<dependency><groupId>com.fasterxml.jackson.dataformat</groupId><artifactId>jackson-dataformat-cbor</artifactId><version>${version.jackson}</version></dependency>
<!-- Logging -->
<dependency><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>2.0.5</version></dependency>
<dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId><version>1.4.5</version></dependency>
<dependency><groupId>ch.qos.logback</groupId><artifactId>logback-core</artifactId><version>1.4.5</version></dependency>
<!-- Test deps -->
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><version>5.9.1</version><scope>test</scope></dependency>
<dependency><groupId>org.assertj</groupId><artifactId>assertj-core</artifactId><version>3.23.1</version><scope>test</scope></dependency>
<dependency><groupId>org.apache.commons</groupId><artifactId>commons-csv</artifactId><version>1.9.0</version><scope>test</scope></dependency>
<dependency><groupId>org.jetbrains.kotlin</groupId><artifactId>kotlin-test</artifactId><version>${version.kotlin}</version><scope>test</scope></dependency>
</dependencies>
<profiles>
<profile>
<id>debug</id>
<properties>
<jvm.args.debug>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5050</jvm.args.debug>
</properties>
</profile>
<!-- Releasing to Maven Central -->
<profile>
<id>release</id><!-- Was: "ossrh", but then this happened:
The requested profile "release" could not be activated because it does not exist.
Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project csv-cruncher: Remote staging failed: Staging rules failure!
-->
<activation>
<property><name>release</name></property>
</activation>
<build>
<plugins>
<!-- Generate a JavaDoc and source jars -->
<plugin>
<groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>3.2.1</version>
<configuration><includes>**/*.kt</includes></configuration>
<executions><execution><id>attach-sources</id><goals><goal>jar</goal></goals></execution></executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><version>3.4.1</version>
<executions><execution><id>attach-javadocs</id><goals><goal>jar</goal></goals></execution></executions>
</plugin>
<!-- <plugin> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kdoc-maven-plugin</artifactId> <version>${version.kotlin}</version> </plugin> -->
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>${version.kotlin-dokka}</version>
<executions>
<execution><id>dokka-site</id><phase>pre-site</phase><goals><goal>dokka</goal></goals></execution>
<execution><id>dokka-jar</id><phase>package</phase><goals><goal>javadocJar</goal></goals></execution>
</executions>
<configuration><dokkaPlugins><plugin><groupId>org.jetbrains.dokka</groupId><artifactId>kotlin-as-java-plugin</artifactId><version>${version.kotlin-dokka}</version></plugin></dokkaPlugins></configuration>
</plugin>
<!-- Release plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://${ossrh.host}/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<!-- This relies on the gpg command being installed and the GPG credentials being available e.g. from settings.xml. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals><goal>sign</goal></goals>
<configuration>
<!-- Remember to run this before Maven build: export GPG_TTY=$(tty) -->
<keyname>73BA361CA92D829800730DE207838E30786B5257</keyname>
<passphrase>${gpg.passphrase}</passphrase>
<executable>${gpg.executable}</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<!-- Releasing to OSSRH, the alternative way. The other way is to use the 'release' profile, using -Drelease. -->
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<name>ossrh</name>
<url>https://${ossrh.host}/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>ossrh</name>
<url>https://${ossrh.host}/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>