Skip to content

Commit 73ebee8

Browse files
authored
Update implementation packaging (#287)
Signed-off-by: Lukas Jungmann <[email protected]>
1 parent d8dc6ab commit 73ebee8

File tree

13 files changed

+366
-200
lines changed

13 files changed

+366
-200
lines changed

bundles/jakarta.json/pom.xml

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
5+
6+
This program and the accompanying materials are made available under the
7+
terms of the Eclipse Public License v. 2.0, which is available at
8+
http://www.eclipse.org/legal/epl-2.0.
9+
10+
This Source Code may also be made available under the following Secondary
11+
Licenses when the conditions for such availability set forth in the
12+
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
13+
version 2 with the GNU Classpath Exception, which is available at
14+
https://www.gnu.org/software/classpath/license.html.
15+
16+
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17+
18+
-->
19+
20+
<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">
21+
<modelVersion>4.0.0</modelVersion>
22+
23+
<parent>
24+
<groupId>org.eclipse.jsonp</groupId>
25+
<artifactId>json-bundles</artifactId>
26+
<version>2.0.2-SNAPSHOT</version>
27+
<relativePath>../pom.xml</relativePath>
28+
</parent>
29+
30+
<groupId>org.eclipse.jsonp</groupId>
31+
<artifactId>jakarta.json</artifactId>
32+
<version>2.0.2-SNAPSHOT</version>
33+
<name>JSON-P Default Provider</name>
34+
<description>Default provider for Jakarta JSON Processing</description>
35+
<url>https://github.com/eclipse-ee4j/jsonp</url>
36+
37+
<dependencies>
38+
<dependency>
39+
<groupId>jakarta.json</groupId>
40+
<artifactId>jakarta.json-api</artifactId>
41+
<scope>provided</scope>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.eclipse.jsonp</groupId>
45+
<artifactId>jsonp</artifactId>
46+
<scope>provided</scope>
47+
</dependency>
48+
</dependencies>
49+
50+
<properties>
51+
<dep.sources>${project.build.directory}/generated-sources/dependencies</dep.sources>
52+
</properties>
53+
54+
<build>
55+
<plugins>
56+
<plugin>
57+
<groupId>org.apache.maven.plugins</groupId>
58+
<artifactId>maven-dependency-plugin</artifactId>
59+
<executions>
60+
<execution>
61+
<id>unpack-sources</id>
62+
<phase>generate-sources</phase>
63+
<goals>
64+
<goal>unpack-dependencies</goal>
65+
</goals>
66+
<configuration>
67+
<includeScope>provided</includeScope>
68+
<classifier>sources</classifier>
69+
<excludeTransitive>true</excludeTransitive>
70+
<excludes>module-info.*,META-INF/services/**, META-INF/MANIFEST.MF</excludes>
71+
<outputDirectory>${dep.sources}</outputDirectory>
72+
</configuration>
73+
</execution>
74+
</executions>
75+
</plugin>
76+
<plugin>
77+
<groupId>org.codehaus.mojo</groupId>
78+
<artifactId>build-helper-maven-plugin</artifactId>
79+
<executions>
80+
<execution>
81+
<id>add-resource</id>
82+
<phase>generate-resources</phase>
83+
<goals>
84+
<goal>add-resource</goal>
85+
</goals>
86+
<configuration>
87+
<resources>
88+
<resource>
89+
<directory>${dep.sources}</directory>
90+
<excludes>
91+
<exclude>**/*.java</exclude>
92+
</excludes>
93+
</resource>
94+
</resources>
95+
</configuration>
96+
</execution>
97+
<execution>
98+
<id>add-source</id>
99+
<phase>generate-sources</phase>
100+
<goals>
101+
<goal>add-source</goal>
102+
</goals>
103+
<configuration>
104+
<sources>
105+
<source>${dep.sources}</source>
106+
</sources>
107+
</configuration>
108+
</execution>
109+
</executions>
110+
</plugin>
111+
<plugin>
112+
<groupId>org.apache.maven.plugins</groupId>
113+
<artifactId>maven-antrun-plugin</artifactId>
114+
<executions>
115+
<execution>
116+
<id>fix-default-provider</id>
117+
<phase>generate-sources</phase>
118+
<goals>
119+
<goal>run</goal>
120+
</goals>
121+
<configuration>
122+
<target>
123+
<replace file="${project.build.directory}/generated-sources/dependencies/jakarta/json/spi/JsonProvider.java">
124+
<replacefilter>
125+
<replacetoken><![CDATA[org.glassfish.json.JsonProviderImpl]]></replacetoken>
126+
<replacevalue><![CDATA[org.eclipse.jsonp.JsonProviderImpl]]></replacevalue>
127+
</replacefilter>
128+
</replace>
129+
</target>
130+
</configuration>
131+
</execution>
132+
</executions>
133+
</plugin>
134+
<plugin>
135+
<groupId>org.glassfish.build</groupId>
136+
<artifactId>spec-version-maven-plugin</artifactId>
137+
<configuration>
138+
<spec>
139+
<nonFinal>${non.final}</nonFinal>
140+
<jarType>impl</jarType>
141+
<specVersion>${spec_version}</specVersion>
142+
<newSpecVersion>${new_spec_version}</newSpecVersion>
143+
<specImplVersion>${new_spec_impl_version}</specImplVersion>
144+
<implVersion>${impl_version}</implVersion>
145+
<newImplVersion>${new_impl_version}</newImplVersion>
146+
<apiPackage>${api_package}</apiPackage>
147+
<implNamespace>${impl_namespace}</implNamespace>
148+
</spec>
149+
</configuration>
150+
<executions>
151+
<execution>
152+
<goals>
153+
<goal>set-spec-properties</goal>
154+
<!-- TODO:
155+
glassfish-spec-version-maven-plugin needs to be updated
156+
in order to check 'jakarta.' prefixed values in manifest entries
157+
-->
158+
<!--<goal>check-module</goal>-->
159+
</goals>
160+
</execution>
161+
</executions>
162+
</plugin>
163+
<plugin>
164+
<groupId>org.apache.felix</groupId>
165+
<artifactId>maven-bundle-plugin</artifactId>
166+
<executions>
167+
<execution>
168+
<id>osgi-manifest</id>
169+
<goals>
170+
<goal>manifest</goal>
171+
</goals>
172+
<configuration>
173+
<instructions>
174+
<Bundle-Version>${spec.bundle.version}</Bundle-Version>
175+
<Bundle-SymbolicName>${spec.bundle.symbolic-name}</Bundle-SymbolicName>
176+
<Extension-Name>${spec.extension.name}</Extension-Name>
177+
<Implementation-Version>${spec.implementation.version}</Implementation-Version>
178+
<Specification-Vendor>Eclipse Foundation</Specification-Vendor>
179+
<Specification-Version>${spec.specification.version}</Specification-Version>
180+
<Export-Package>!org.eclipse.jsonp,*</Export-Package>
181+
</instructions>
182+
</configuration>
183+
</execution>
184+
</executions>
185+
</plugin>
186+
<plugin>
187+
<groupId>org.apache.maven.plugins</groupId>
188+
<artifactId>maven-jar-plugin</artifactId>
189+
<configuration>
190+
<archive>
191+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
192+
<manifest>
193+
<addDefaultEntries>false</addDefaultEntries>
194+
</manifest>
195+
</archive>
196+
</configuration>
197+
</plugin>
198+
<plugin>
199+
<groupId>org.apache.maven.plugins</groupId>
200+
<artifactId>maven-javadoc-plugin</artifactId>
201+
<configuration>
202+
<archive>
203+
<manifest>
204+
<addDefaultEntries>false</addDefaultEntries>
205+
</manifest>
206+
</archive>
207+
<release>11</release>
208+
<notimestamp>true</notimestamp>
209+
<docfilessubdirs>true</docfilessubdirs>
210+
<description>JSON Processing API documentation</description>
211+
<doctitle>JSON Processing API documentation</doctitle>
212+
<windowtitle>JSON Processing API documentation</windowtitle>
213+
<header><![CDATA[<br>JSON Processing API v${project.version}]]></header>
214+
<bottom><![CDATA[
215+
Comments to: <a href="mailto:[email protected]">[email protected]</a>.<br>
216+
Copyright &#169; 2019, 2021 Eclipse Foundation. All rights reserved.<br>
217+
Use is subject to <a href="{@docRoot}/doc-files/speclicense.html" target="_top">license terms</a>.]]>
218+
</bottom>
219+
</configuration>
220+
</plugin>
221+
</plugins>
222+
</build>
223+
224+
</project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
3+
*
4+
* This program and the accompanying materials are made available under the
5+
* terms of the Eclipse Public License v. 2.0, which is available at
6+
* http://www.eclipse.org/legal/epl-2.0.
7+
*
8+
* This Source Code may also be made available under the following Secondary
9+
* Licenses when the conditions for such availability set forth in the
10+
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
11+
* version 2 with the GNU Classpath Exception, which is available at
12+
* https://www.gnu.org/software/classpath/license.html.
13+
*
14+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15+
*/
16+
17+
module jakarta.json {
18+
19+
exports jakarta.json;
20+
exports jakarta.json.spi;
21+
exports jakarta.json.stream;
22+
exports org.eclipse.jsonp.api;
23+
24+
uses jakarta.json.spi.JsonProvider;
25+
}

bundles/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<url>https://github.com/eclipse-ee4j/jsonp</url>
3636

3737
<modules>
38+
<module>jakarta.json</module>
3839
<module>ri</module>
3940
</modules>
4041
</project>

bundles/ri/pom.xml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<version>2.0.2-SNAPSHOT</version>
2626
</parent>
2727

28-
<artifactId>json-ri-bundle</artifactId>
28+
<artifactId>jakarta.json-ri</artifactId>
2929
<name>RI Distribution zip bundle</name>
3030
<packaging>pom</packaging>
3131

@@ -36,12 +36,11 @@
3636
</dependency>
3737
<dependency>
3838
<groupId>org.eclipse.jsonp</groupId>
39-
<artifactId>jakarta.json</artifactId>
39+
<artifactId>jsonp</artifactId>
4040
</dependency>
4141
<dependency>
4242
<groupId>org.eclipse.jsonp</groupId>
4343
<artifactId>jakarta.json</artifactId>
44-
<classifier>module</classifier>
4544
</dependency>
4645
<dependency>
4746
<groupId>org.eclipse.jsonp</groupId>
@@ -61,7 +60,6 @@
6160
<goal>single</goal>
6261
</goals>
6362
<configuration>
64-
<finalName>jakarta.json-ri-${impl_version}</finalName>
6563
<descriptors>
6664
<descriptor>src/main/assembly/archive.xml</descriptor>
6765
</descriptors>
@@ -70,6 +68,31 @@
7068
</execution>
7169
</executions>
7270
</plugin>
71+
<plugin>
72+
<groupId>org.apache.maven.plugins</groupId>
73+
<artifactId>maven-dependency-plugin</artifactId>
74+
<executions>
75+
<execution>
76+
<id>stage</id>
77+
<phase>package</phase>
78+
<goals>
79+
<goal>unpack</goal>
80+
</goals>
81+
<configuration>
82+
<excludes>**/module-info.java</excludes>
83+
<artifactItems>
84+
<artifactItem>
85+
<groupId>${project.groupId}</groupId>
86+
<artifactId>${project.artifactId}</artifactId>
87+
<version>${project.version}</version>
88+
<type>zip</type>
89+
<outputDirectory>${project.build.directory}/stage</outputDirectory>
90+
</artifactItem>
91+
</artifactItems>
92+
</configuration>
93+
</execution>
94+
</executions>
95+
</plugin>
7396
</plugins>
7497
</build>
7598
</project>

bundles/ri/src/main/assembly/archive.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,15 @@
3838
<outputDirectory>mods</outputDirectory>
3939
<includes>
4040
<include>jakarta.json:jakarta.json-api:*</include>
41-
<include>org.eclipse.jsonp:jakarta.json:jar:module:*</include>
41+
<include>org.eclipse.jsonp:jsonp:*</include>
4242
</includes>
4343
</dependencySet>
4444
<dependencySet>
4545
<useProjectArtifact>false</useProjectArtifact>
4646
<outputDirectory>standalone</outputDirectory>
4747
<includes>
48-
<include>org.eclipse.jsonp:jakarta.json</include>
48+
<include>org.eclipse.jsonp:jakarta.json:*</include>
4949
</includes>
50-
<excludes>
51-
<exclude>org.eclipse.jsonp:jakarta.json:jar:module:*</exclude>
52-
</excludes>
5350
</dependencySet>
5451
<dependencySet>
5552
<useProjectArtifact>false</useProjectArtifact>

0 commit comments

Comments
 (0)