@@ -53,6 +53,96 @@ working with JSR-353 (JSON-P) node types via data-binding
53
53
<groupId >org.moditect</groupId >
54
54
<artifactId >moditect-maven-plugin</artifactId >
55
55
</plugin >
56
+
57
+ <plugin >
58
+ <groupId >org.apache.maven.plugins</groupId >
59
+ <artifactId >maven-shade-plugin</artifactId >
60
+ <executions >
61
+ <execution >
62
+ <id >jakarta</id >
63
+ <phase >package</phase >
64
+ <goals >
65
+ <goal >shade</goal >
66
+ </goals >
67
+ <configuration >
68
+ <shadedArtifactAttached >true</shadedArtifactAttached >
69
+ <shadedClassifierName >jakarta</shadedClassifierName >
70
+ <createDependencyReducedPom >false</createDependencyReducedPom >
71
+ <artifactSet >
72
+ <includes >
73
+ <include >${project.groupId} :${project.artifactId} </include >
74
+ </includes >
75
+ </artifactSet >
76
+ <filters >
77
+ <filter >
78
+ <artifact >${project.groupId} :${project.artifactId} </artifact >
79
+ <excludes >
80
+ <exclude >META-INF/MANIFEST.MF</exclude >
81
+ </excludes >
82
+ </filter >
83
+ </filters >
84
+ <relocations >
85
+ <relocation >
86
+ <pattern >javax.json</pattern >
87
+ <shadedPattern >jakarta.json</shadedPattern >
88
+ </relocation >
89
+ </relocations >
90
+ <transformers >
91
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
92
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.IncludeResourceTransformer" >
93
+ <resource >META-INF/MANIFEST.MF</resource >
94
+ <file >${project.build.directory} /jakarta/MANIFEST.MF</file >
95
+ </transformer >
96
+ </transformers >
97
+ </configuration >
98
+ </execution >
99
+ </executions >
100
+ <dependencies >
101
+ <dependency >
102
+ <groupId >io.yupiik.maven</groupId >
103
+ <artifactId >maven-shade-transformers</artifactId >
104
+ <version >0.0.1</version >
105
+ </dependency >
106
+ </dependencies >
107
+ </plugin >
108
+
109
+ <!-- Jakarta bundle fix - nb place last for execution order on package phase
110
+ @gedmarc 20210222-->
111
+ <plugin >
112
+ <groupId >org.apache.felix</groupId >
113
+ <artifactId >maven-bundle-plugin</artifactId >
114
+ <executions >
115
+ <execution >
116
+ <id >default_bundle</id >
117
+ <phase >process-classes</phase >
118
+ <goals >
119
+ <goal >bundle</goal >
120
+ </goals >
121
+ <configuration >
122
+ <manifestLocation >${project.build.directory} /javax</manifestLocation >
123
+ <packaging >jar</packaging >
124
+ <instructions >
125
+ <_nouses >false</_nouses >
126
+ </instructions >
127
+ </configuration >
128
+ </execution >
129
+ <execution >
130
+ <id >bundle_jakarta_manifest</id >
131
+ <phase >process-classes</phase >
132
+ <goals >
133
+ <goal >manifest</goal >
134
+ </goals >
135
+ <configuration >
136
+ <manifestLocation >${project.build.directory} /jakarta</manifestLocation >
137
+ <classifier >jakarta</classifier >
138
+ <packaging >jar</packaging >
139
+ <instructions >
140
+ <Import-Package >jakarta.json;version="[3.0,4)",!javax.json,*</Import-Package >
141
+ </instructions >
142
+ </configuration >
143
+ </execution >
144
+ </executions >
145
+ </plugin >
56
146
</plugins >
57
147
</build >
58
148
0 commit comments