Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Commit 71361f7

Browse files
committed
JSON_PROCESSING_SPEC-81: Provide JDK 9 module definition
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
1 parent e66c54c commit 71361f7

File tree

14 files changed

+912
-224
lines changed

14 files changed

+912
-224
lines changed

api/src/main/jdk9/module-info.java

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
*
4+
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
5+
*
6+
* The contents of this file are subject to the terms of either the GNU
7+
* General Public License Version 2 only ("GPL") or the Common Development
8+
* and Distribution License("CDDL") (collectively, the "License"). You
9+
* may not use this file except in compliance with the License. You can
10+
* obtain a copy of the License at
11+
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
12+
* or packager/legal/LICENSE.txt. See the License for the specific
13+
* language governing permissions and limitations under the License.
14+
*
15+
* When distributing the software, include this License Header Notice in each
16+
* file and include the License file at packager/legal/LICENSE.txt.
17+
*
18+
* GPL Classpath Exception:
19+
* Oracle designates this particular file as subject to the "Classpath"
20+
* exception as provided by Oracle in the GPL Version 2 section of the License
21+
* file that accompanied this code.
22+
*
23+
* Modifications:
24+
* If applicable, add the following below the License Header, with the fields
25+
* enclosed by brackets [] replaced by your own identifying information:
26+
* "Portions Copyright [year] [name of copyright owner]"
27+
*
28+
* Contributor(s):
29+
* If you wish your version of this file to be governed by only the CDDL or
30+
* only the GPL Version 2, indicate your decision by adding "[Contributor]
31+
* elects to include this software in this distribution under the [CDDL or GPL
32+
* Version 2] license." If you don't indicate a single choice of license, a
33+
* recipient has the option to distribute your version of this file under
34+
* either the CDDL, the GPL Version 2 or to extend the choice of license to
35+
* its licensees as provided above. However, if you add GPL Version 2 code
36+
* and therefore, elected the GPL Version 2 license, then the option applies
37+
* only if the new code is made subject to such option by the copyright
38+
* holder.
39+
*/
40+
module javax.json {
41+
exports javax.json;
42+
exports javax.json.spi;
43+
exports javax.json.stream;
44+
uses javax.json.spi.JsonProvider;
45+
}

bundles/licensee/pom.xml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
55
6-
Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
6+
Copyright (c) 2013-2016 Oracle and/or its affiliates. All rights reserved.
77
88
The contents of this file are subject to the terms of either the GNU
99
General Public License Version 2 only ("GPL") or the Common Development
@@ -60,24 +60,24 @@
6060
</dependencies>
6161
<build>
6262
<plugins>
63-
<plugin>
64-
<groupId>org.codehaus.mojo</groupId>
65-
<artifactId>wagon-maven-plugin</artifactId>
66-
<executions>
67-
<execution>
68-
<id>get-license</id>
69-
<phase>package</phase>
70-
<goals>
71-
<goal>download-single</goal>
72-
</goals>
73-
<configuration>
74-
<url>${license.url}</url>
75-
<fromFile>TLDA_SCSL_Licensees_License_Notice.txt</fromFile>
76-
<toDir>${assembly.directory}</toDir>
77-
</configuration>
78-
</execution>
79-
</executions>
80-
</plugin>
63+
<plugin>
64+
<groupId>org.codehaus.mojo</groupId>
65+
<artifactId>wagon-maven-plugin</artifactId>
66+
<executions>
67+
<execution>
68+
<id>get-license</id>
69+
<phase>package</phase>
70+
<goals>
71+
<goal>download-single</goal>
72+
</goals>
73+
<configuration>
74+
<url>${license.url}</url>
75+
<fromFile>TLDA_SCSL_Licensees_License_Notice.txt</fromFile>
76+
<toDir>${assembly.directory}</toDir>
77+
</configuration>
78+
</execution>
79+
</executions>
80+
</plugin>
8181
<plugin>
8282
<artifactId>maven-assembly-plugin</artifactId>
8383
<configuration>
@@ -92,7 +92,7 @@
9292
<id>make-assembly</id>
9393
<phase>package</phase>
9494
<goals>
95-
<goal>attached</goal>
95+
<goal>single</goal>
9696
</goals>
9797
</execution>
9898
</executions>

demos/facebook/pom.xml

Lines changed: 124 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
44
5-
Copyright (c) 2012-2015 Oracle and/or its affiliates. All rights reserved.
5+
Copyright (c) 2012-2016 Oracle and/or its affiliates. All rights reserved.
66
77
The contents of this file are subject to the terms of either the GNU
88
General Public License Version 2 only ("GPL") or the Common Development
@@ -55,41 +55,128 @@
5555
<url>http://maven.apache.org</url>
5656
<artifactId>jsondemos-facebook</artifactId>
5757

58-
<dependencies>
59-
<dependency>
60-
<groupId>javax.json</groupId>
61-
<artifactId>javax.json-api</artifactId>
62-
<scope>compile</scope>
63-
</dependency>
64-
<dependency>
65-
<groupId>org.glassfish</groupId>
66-
<artifactId>javax.json</artifactId>
67-
<scope>runtime</scope>
68-
</dependency>
69-
</dependencies>
58+
<properties>
59+
<main.class>org.glassfish.jsondemos.facebook.FacebookObjectSearch</main.class>
60+
</properties>
61+
62+
<profiles>
63+
<profile>
64+
<id>all</id>
65+
<activation>
66+
<activeByDefault>true</activeByDefault>
67+
</activation>
68+
<dependencies>
69+
<dependency>
70+
<groupId>javax.json</groupId>
71+
<artifactId>javax.json-api</artifactId>
72+
<scope>compile</scope>
73+
</dependency>
74+
<dependency>
75+
<groupId>org.glassfish</groupId>
76+
<artifactId>javax.json</artifactId>
77+
<scope>runtime</scope>
78+
</dependency>
79+
</dependencies>
80+
<build>
81+
<plugins>
82+
<plugin>
83+
<groupId>org.codehaus.mojo</groupId>
84+
<artifactId>exec-maven-plugin</artifactId>
85+
<executions>
86+
<execution>
87+
<id>example-facebook-jdk8</id>
88+
<goals>
89+
<goal>java</goal>
90+
</goals>
91+
</execution>
92+
</executions>
93+
<configuration>
94+
<mainClass>${main.class}</mainClass>
95+
</configuration>
96+
</plugin>
97+
</plugins>
98+
</build>
99+
</profile>
100+
101+
<profile>
102+
<id>jdk9</id>
103+
<activation>
104+
<jdk>9</jdk>
105+
</activation>
106+
<dependencies>
107+
<dependency>
108+
<groupId>org.glassfish</groupId>
109+
<artifactId>javax.json</artifactId>
110+
<scope>compile</scope>
111+
</dependency>
112+
</dependencies>
113+
<properties>
114+
<modules.directory>${project.build.directory}/modules</modules.directory>
115+
</properties>
116+
<build>
117+
<plugins>
118+
<plugin>
119+
<groupId>org.apache.maven.plugins</groupId>
120+
<artifactId>maven-dependency-plugin</artifactId>
121+
<configuration>
122+
<stripVersion>true</stripVersion>
123+
<outputDirectory>${modules.directory}</outputDirectory>
124+
</configuration>
125+
<executions>
126+
<execution>
127+
<id>get-dependencies</id>
128+
<phase>package</phase>
129+
<goals>
130+
<goal>copy-dependencies</goal>
131+
</goals>
132+
<configuration>
133+
<includeArtifactIds>javax.json</includeArtifactIds>
134+
</configuration>
135+
</execution>
136+
<execution>
137+
<id>get-project-artifact</id>
138+
<phase>package</phase>
139+
<goals>
140+
<goal>copy</goal>
141+
</goals>
142+
<configuration>
143+
<artifactItems>
144+
<artifactItem>
145+
<groupId>${project.groupId}</groupId>
146+
<artifactId>${project.artifactId}</artifactId>
147+
<version>${project.version}</version>
148+
</artifactItem>
149+
</artifactItems>
150+
</configuration>
151+
</execution>
152+
</executions>
153+
</plugin>
154+
<plugin>
155+
<groupId>org.codehaus.mojo</groupId>
156+
<artifactId>exec-maven-plugin</artifactId>
157+
<configuration>
158+
<executable>java</executable>
159+
<arguments>
160+
<argument>--add-modules</argument>
161+
<argument>org.glassfish.javax.json</argument>
162+
<argument>--module-path</argument>
163+
<argument>${modules.directory}</argument>
164+
<argument>-m</argument>
165+
<argument>org.glassfish.javax.json.demos.facebook/${main.class}</argument>
166+
</arguments>
167+
</configuration>
168+
<executions>
169+
<execution>
170+
<id>example-facebook-jdk9</id>
171+
<goals>
172+
<goal>exec</goal>
173+
</goals>
174+
</execution>
175+
</executions>
176+
</plugin>
177+
</plugins>
178+
</build>
179+
</profile>
180+
</profiles>
70181

71-
<build>
72-
<plugins>
73-
<plugin>
74-
<groupId>org.apache.maven.plugins</groupId>
75-
<artifactId>maven-compiler-plugin</artifactId>
76-
</plugin>
77-
<!-- mvn exec:java
78-
-->
79-
<plugin>
80-
<groupId>org.codehaus.mojo</groupId>
81-
<artifactId>exec-maven-plugin</artifactId>
82-
<executions>
83-
<execution>
84-
<goals>
85-
<goal>java</goal>
86-
</goals>
87-
</execution>
88-
</executions>
89-
<configuration>
90-
<mainClass>org.glassfish.jsondemos.facebook.FacebookObjectSearch</mainClass>
91-
</configuration>
92-
</plugin>
93-
</plugins>
94-
</build>
95182
</project>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
*
4+
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
5+
*
6+
* The contents of this file are subject to the terms of either the GNU
7+
* General Public License Version 2 only ("GPL") or the Common Development
8+
* and Distribution License("CDDL") (collectively, the "License"). You
9+
* may not use this file except in compliance with the License. You can
10+
* obtain a copy of the License at
11+
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
12+
* or packager/legal/LICENSE.txt. See the License for the specific
13+
* language governing permissions and limitations under the License.
14+
*
15+
* When distributing the software, include this License Header Notice in each
16+
* file and include the License file at packager/legal/LICENSE.txt.
17+
*
18+
* GPL Classpath Exception:
19+
* Oracle designates this particular file as subject to the "Classpath"
20+
* exception as provided by Oracle in the GPL Version 2 section of the License
21+
* file that accompanied this code.
22+
*
23+
* Modifications:
24+
* If applicable, add the following below the License Header, with the fields
25+
* enclosed by brackets [] replaced by your own identifying information:
26+
* "Portions Copyright [year] [name of copyright owner]"
27+
*
28+
* Contributor(s):
29+
* If you wish your version of this file to be governed by only the CDDL or
30+
* only the GPL Version 2, indicate your decision by adding "[Contributor]
31+
* elects to include this software in this distribution under the [CDDL or GPL
32+
* Version 2] license." If you don't indicate a single choice of license, a
33+
* recipient has the option to distribute your version of this file under
34+
* either the CDDL, the GPL Version 2 or to extend the choice of license to
35+
* its licensees as provided above. However, if you add GPL Version 2 code
36+
* and therefore, elected the GPL Version 2 license, then the option applies
37+
* only if the new code is made subject to such option by the copyright
38+
* holder.
39+
*/
40+
module org.glassfish.javax.json.demos.facebook {
41+
requires org.glassfish.javax.json;
42+
}

0 commit comments

Comments
 (0)