Skip to content

Commit 141c9ec

Browse files
committed
refactor: add more libs to parent pom
- The guide says everybody should use the MediaType thing from jakarta.ws.rs-api, so lets add it - It also says people are going to need JSON-P (mangling the dataset JSON sent to the plugin), so let's include it as provided and add an implementation to test scope - Adapt example (now very slick!)
1 parent c4289fc commit 141c9ec

2 files changed

Lines changed: 25 additions & 23 deletions

File tree

example/pom.xml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,6 @@
1919
<!-- In a real application, you would omit this -->
2020
<relativePath>../pom.xml</relativePath>
2121
</parent>
22-
23-
<dependencies>
24-
<!-- Two examples for dependencies with versions managed by parent-->
25-
<dependency>
26-
<groupId>jakarta.json</groupId>
27-
<artifactId>jakarta.json-api</artifactId>
28-
<scope>provided</scope>
29-
</dependency>
30-
<dependency>
31-
<groupId>org.eclipse.parsson</groupId>
32-
<artifactId>parsson</artifactId>
33-
<scope>test</scope>
34-
</dependency>
35-
36-
<!-- Example (local) dependency not included in parent management -->
37-
<dependency>
38-
<groupId>jakarta.ws.rs</groupId>
39-
<artifactId>jakarta.ws.rs-api</artifactId>
40-
<scope>provided</scope>
41-
<version>3.1.0</version>
42-
</dependency>
43-
</dependencies>
4422

45-
<!-- There is no <build> section here because the Parent POM takes care of it for this rather simple example! -->
23+
<!-- There is no <build> or <dependencies> section here because the Parent POM takes care of it for this rather simple example! -->
4624
</project>

pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
<slf4j.version>2.0.13</slf4j.version>
9191
<jakarta.json-api.version>2.1.0</jakarta.json-api.version>
9292
<eclipse.parsson.version>1.1.6</eclipse.parsson.version>
93+
<jakarta.ws.rs.version>3.1.0</jakarta.ws.rs.version>
9394

9495
<!-- Testing dependencies -->
9596
<junit.jupiter.version>5.10.2</junit.jupiter.version>
@@ -425,6 +426,11 @@
425426
<artifactId>parsson</artifactId>
426427
<version>${eclipse.parsson.version}</version>
427428
</dependency>
429+
<dependency>
430+
<groupId>jakarta.ws.rs</groupId>
431+
<artifactId>jakarta.ws.rs-api</artifactId>
432+
<version>${jakarta.ws.rs.version}</version>
433+
</dependency>
428434

429435
<!-- TESTING DEPENDENCIES -->
430436
<dependency>
@@ -478,6 +484,18 @@
478484
<artifactId>auto-service</artifactId>
479485
</dependency>
480486

487+
<!-- These are here for convenience, as most exporters will use them one way or another -->
488+
<dependency>
489+
<groupId>jakarta.json</groupId>
490+
<artifactId>jakarta.json-api</artifactId>
491+
<scope>provided</scope>
492+
</dependency>
493+
<dependency>
494+
<groupId>jakarta.ws.rs</groupId>
495+
<artifactId>jakarta.ws.rs-api</artifactId>
496+
<scope>provided</scope>
497+
</dependency>
498+
481499
<!-- All exporters should use SLF4J for logging! -->
482500
<dependency>
483501
<groupId>org.slf4j</groupId>
@@ -496,6 +514,12 @@
496514
<artifactId>slf4j-simple</artifactId>
497515
<scope>test</scope>
498516
</dependency>
517+
<!-- This is here for convenience, providing a sane default JSON-P implementation (as used in Payara) -->
518+
<dependency>
519+
<groupId>org.eclipse.parsson</groupId>
520+
<artifactId>parsson</artifactId>
521+
<scope>test</scope>
522+
</dependency>
499523
</dependencies>
500524

501525
<profiles>

0 commit comments

Comments
 (0)