This repository has been archived by the owner on Sep 29, 2024. It is now read-only.
forked from tkutcher/jgrade
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpom.xml
512 lines (503 loc) · 25.9 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
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
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<?xml version="1.0" encoding="UTF-8"?>
<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>
<developers>
<developer>
<id>dscpsyl</id>
<name>dscpsyl</name>
<email>[email protected]</email>
<url>https://github.com/dscpsyl</url>
<organization>UCSB</organization>
<organizationUrl>https://www.cs.ucsb.edu/</organizationUrl>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
<timezone>America/Los_Angeles</timezone>
</developer>
<developer>
<id>pconrad</id>
<name>Phill Conrad</name>
<email>[email protected]</email>
<url>https://github.com/pconrad</url>
<organization>UCSB</organization>
<organizationUrl>https://www.cs.ucsb.edu/</organizationUrl>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
<timezone>America/Los_Angeles</timezone>
</developer>
</developers>
<groupId>io.github.dscpsyl</groupId>
<artifactId>jgrade2</artifactId>
<packaging>jar</packaging>
<version>2.0.0-a2</version> <!-- NOTE - If major/minor version changes, update project.finalName in properties -->
<name>jgrade2</name>
<url>https://github.com/dscpsyl/jgrade2</url>
<description>An update to the original jGrade (based on tkutcher/jgrade) for Java 17 and jUnit 5</description>
<!-- Required for Maven Central-->
<scm>
<connection>scm:git:https://github.com/dscpsyl/jgrade2.git</connection>
<developerConnection>scm:git:https://github.com/dscpsyl/jgrade2.git</developerConnection>
<url>https://github.com/dscpsyl/jgrade2.git</url>
<tag>HEAD</tag>
</scm>
<licenses>
<license>
<name>MIT License</name>
<url>https://github.com/dscpsyl/jgrade2/blob/dev/LICENSE.md</url>
</license>
</licenses>
<properties> <!-- NOTE - All dependency, java, and plugin versions should be added/changed here -->
<project.finalName>jgrade2-2.0.0-a2</project.finalName>
<java.target.version>17</java.target.version>
<commons-cli.version>1.5.0</commons-cli.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<org.json.version>chargebee-1.0</org.json.version>
<maven-checkstyle-plugin.version>3.3.0</maven-checkstyle-plugin.version>
<maven-wrapper-parent.version>3.2.0</maven-wrapper-parent.version>
<maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version>
<maven-javadoc-plugin.version>3.6.2</maven-javadoc-plugin.version>
<hamcrest.version>2.2</hamcrest.version>
<junit-jupiter.version>5.10.0</junit-jupiter.version>
<junit-platform.version>1.10.0</junit-platform.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco-coverage.version>0.8.11</jacoco-coverage.version>
<pitest-mutation.version>1.15.3</pitest-mutation.version>
<pitest-junit5.version>1.2.1</pitest-junit5.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
<!-- Maven Central release options-->
<jreleaser.version>1.9.0</jreleaser.version>
<jreleaser.closeRepository>false</jreleaser.closeRepository> <!--!CHANGE AFTER FIRST PUBLISH-->
<jreleaser.releaseRepository>false</jreleaser.releaseRepository> <!--!CHANGE AFTER FIRST PUBLISH-->
<target.deploy.folder>local::file:./target/staging-deploy</target.deploy.folder>
</properties>
<!--________________________DO NOT CHANGE BELOW THIS LINE BETWEEN VERSIONS UNLESS ADDING/REMOVING/UPGRADING________________________-->
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId> <!-- NOTE - Put hamcrest dependencies first to override all other versions (specifically for jUnit5)-->
<version>${hamcrest.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId> <!--NOTE - Required due to change in packaging from hamcrest 1.x to 2.x. See https://hamcrest.org/JavaHamcrest/distributables-->
<version>${hamcrest.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId> <!--NOTE - Required due to change in packaging from hamcrest 1.x to 2.x. See https://hamcrest.org/JavaHamcrest/distributables-->
<version>${hamcrest.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId> <!-- NOTE - Aggregator artifact for api, engine, and params. See https://junit.org/junit5/docs/current/user-guide/#dependency-metadata-->
<version>${junit-jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<version>${junit-platform.version}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${junit-platform.version}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-reporting</artifactId>
<version>${junit-platform.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>org.json</artifactId>
<version>${org.json.version}</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>${commons-cli.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wrapper</groupId>
<artifactId>maven-wrapper-parent</artifactId>
<version>${maven-wrapper-parent.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<finalName>${project.finalName}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.target.version}</source>
<target>${java.target.version}</target>
</configuration>
</plugin>
<plugin>
<!-- Required for Javadoc in Github-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<additionalOptions>-html5</additionalOptions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<executions>
<execution>
<id>create-my-bundle</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.finalName}-all</finalName>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<mainClass>com.github.dscpsyl.jgrade2.JGrade2</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<configuration>
<configLocation>res/jgrade2_checks.xml</configLocation>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-coverage.version}</version>
<configuration>
<excludes>
<!-- Hard to test for specific failures due to inability to create a TestIdentifier manually-->
<exclude>**/com/github/dscpsyl/jgrade2/gradedtest/GradedTestListener.class</exclude>
<!-- Nothing to do-->
<exclude>**/com/github/dscpsyl/jgrade2/**/DefaultGraderStrategy.*</exclude>
<!-- Mostly private classes and cannot be unit tested-->
<exclude>**/com/github/dscpsyl/jgrade2/**/*CheckstyleGrader.*</exclude>
<!-- CLI interface and difficult to unit test-->
<exclude>**/com/github/dscpsyl/jgrade2/**/*CLITester.*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<phase>test</phase>
<configuration>
<rules>
<rule implementation="org.jacoco.maven.RuleConfiguration">
<element>BUNDLE</element>
<limits>
<limit implementation="org.jacoco.report.check.Limit">
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.75</minimum>
</limit>
<limit implementation="org.jacoco.report.check.Limit">
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.50</minimum>
</limit>
<limit implementation="org.jacoco.report.check.Limit">
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.75</minimum>
</limit>
<limit implementation="org.jacoco.report.check.Limit">
<counter>CLASS</counter>
<value>MISSEDCOUNT</value>
<maximum>0</maximum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>${pitest-mutation.version}</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>mutationCoverage</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>${pitest-junit5.version}</version>
</dependency>
</dependencies>
<configuration>
<historyInputFile>
target/pit-history/history.bin
</historyInputFile>
<historyOutputFile>
target/pit-history/history.bin
</historyOutputFile>
<verbose>true</verbose>
<targetClasses>
<param>com.github.dscpsyl.jgrade2.*</param>
</targetClasses>
<targetTests>
<param>com.github.dscpsyl.jgrade2.*</param>
</targetTests>
<excludedClasses>
<!--See reason from jacoco test coverage exclusion-->
<param>com.github.dscpsyl.jgrade2.CheckstyleGrader</param>
<!--See reason from jacoco test coverage exclusion-->
<param>com.github.dscpsyl.jgrade2.CLITester*</param>
</excludedClasses>
<excludedTestClasses></excludedTestClasses>
<excludedMethods>
<param>flush_and_close_noPitest</param>
<!--Private constructor-->
<param>com.github.dscpsyl.jgrade2.ReflectGrade.ReflectGrade</param>
</excludedMethods>
<outputFormats>
<outputFormat>HTML</outputFormat>
<outputFormat>CSV</outputFormat>
<outputFormat>XML</outputFormat>
</outputFormats>
<avoidCallsTo>
<avoidCallsTo>java.util.logging</avoidCallsTo>
<avoidCallsTo>org.apache.log4j</avoidCallsTo>
<avoidCallsTo>org.slf4j</avoidCallsTo>
<avoidCallsTo>org.apache.commons.logging</avoidCallsTo>
<avoidCallsTo>java.lang.Exception</avoidCallsTo>
</avoidCallsTo>
<timestampedReports>false</timestampedReports>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<properties>
<maven.test.skip>true</maven.test.skip>
<checker.fail.on.error>true</checker.fail.on.error>
<altDeploymentRepository>${target.deploy.folder}</altDeploymentRepository>
</properties>
<build>
<defaultGoal>deploy</defaultGoal>
<finalName>${project.finalName}</finalName>
<plugins>
<plugin>
<groupId>org.kordamp.maven</groupId>
<artifactId>pomchecker-maven-plugin</artifactId>
<version>1.9.0</version>
<executions>
<execution>
<id>check-release</id>
<phase>validate</phase>
<goals>
<goal>check-maven-central</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.target.version}</source>
<target>${java.target.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<executions>
<execution>
<id>create-my-bundle</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.finalName}-all</finalName>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<mainClass>com.github.dscpsyl.jgrade2.JGrade2</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<additionalOptions>-html5</additionalOptions>
<failOnError>false</failOnError> <!-- FIXME - Cannot compile due to weird error of org.junit.jupiter.engine module not found-->
</configuration>
<executions>
<execution>
<id>attach-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-source</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jreleaser</groupId>
<artifactId>jreleaser-maven-plugin</artifactId>
<version>${jreleaser.version}</version>
<configuration>
<jreleaser>
<signing>
<active>ALWAYS</active>
<armored>true</armored>
</signing>
<deploy>
<maven>
<nexus2>
<maven-central>
<active>ALWAYS</active>
<url>https://s01.oss.sonatype.org/service/local</url>;
<closeRepository>${jreleaser.closeRepository}</closeRepository>
<releaseRepository>${jreleaser.releaseRepository}</releaseRepository>
<stagingRepositories>target/staging-deploy</stagingRepositories>
</maven-central>
</nexus2>
</maven>
</deploy>
</jreleaser>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>gh_release</id>
<properties>
<maven.test.skip>true</maven.test.skip>
<checker.fail.on.error>true</checker.fail.on.error>
<gh.release.dir>target/gh_release</gh.release.dir>
<outputDirectory>${gh.release.dir}</outputDirectory>
</properties>
<build>
<defaultGoal>package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<executions>
<execution>
<id>create-my-bundle</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.finalName}-all</finalName>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>${gh.release.dir}</outputDirectory>
<workDirectory>${gh.release.dir}</workDirectory>
<archive>
<manifest>
<mainClass>com.github.dscpsyl.jgrade2.JGrade2</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>${gh.release.dir}</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>