Skip to content

Commit f2c3f79

Browse files
authored
json module (#16)
1 parent 43ae377 commit f2c3f79

File tree

8 files changed

+70
-20
lines changed

8 files changed

+70
-20
lines changed

oauth2-server-json/pom.xml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>kotlin-oauth2-server</artifactId>
7+
<groupId>nl.myndocs</groupId>
8+
<version>0.1.1</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>oauth2-server-json</artifactId>
13+
14+
<dependencies>
15+
<dependency>
16+
<groupId>com.google.code.gson</groupId>
17+
<artifactId>gson</artifactId>
18+
<version>2.8.5</version>
19+
</dependency>
20+
</dependencies>
21+
22+
<build>
23+
<plugins>
24+
<plugin>
25+
<groupId>org.apache.maven.plugins</groupId>
26+
<artifactId>maven-shade-plugin</artifactId>
27+
<version>3.1.1</version>
28+
<configuration>
29+
<createSourcesJar>true</createSourcesJar>
30+
<artifactSet>
31+
<includes>
32+
<include>com.google.code.gson:*</include>
33+
</includes>
34+
</artifactSet>
35+
<relocations>
36+
<relocation>
37+
<pattern>com.google.gson</pattern>
38+
<shadedPattern>nl.myndocs.oauth2.shaded.com.google.gson</shadedPattern>
39+
</relocation>
40+
</relocations>
41+
<shadedArtifactAttached>true</shadedArtifactAttached>
42+
<transformers>
43+
<transformer
44+
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
45+
</transformers>
46+
</configuration>
47+
<executions>
48+
<execution>
49+
<phase>package</phase>
50+
<goals>
51+
<goal>shade</goal>
52+
</goals>
53+
</execution>
54+
</executions>
55+
</plugin>
56+
</plugins>
57+
</build>
58+
</project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package nl.myndocs.oauth2.sparkjava.json
1+
package nl.myndocs.oauth2.json
22

33
import com.google.gson.Gson
44

oauth2-server-ktor/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
<scope>provided</scope>
3232
</dependency>
3333
<dependency>
34-
<groupId>com.google.code.gson</groupId>
35-
<artifactId>gson</artifactId>
36-
<version>2.8.5</version>
37-
<scope>provided</scope>
34+
<groupId>nl.myndocs</groupId>
35+
<artifactId>oauth2-server-json</artifactId>
36+
<version>${project.version}</version>
37+
<classifier>shaded</classifier>
3838
</dependency>
3939
</dependencies>
4040

oauth2-server-ktor/src/main/java/nl/myndocs/oauth2/ktor/feature/json/JsonMapper.kt

Lines changed: 0 additions & 9 deletions
This file was deleted.

oauth2-server-ktor/src/main/java/nl/myndocs/oauth2/ktor/feature/request/KtorCallContext.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import io.ktor.response.respondRedirect
1111
import io.ktor.response.respondText
1212
import io.ktor.util.toMap
1313
import kotlinx.coroutines.experimental.runBlocking
14-
import nl.myndocs.oauth2.ktor.feature.json.JsonMapper
14+
import nl.myndocs.oauth2.json.JsonMapper
1515
import nl.myndocs.oauth2.request.CallContext
1616

1717
class KtorCallContext(val applicationCall: ApplicationCall) : CallContext {

oauth2-server-sparkjava/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
<scope>provided</scope>
2626
</dependency>
2727
<dependency>
28-
<groupId>com.google.code.gson</groupId>
29-
<artifactId>gson</artifactId>
30-
<version>2.8.5</version>
31-
<scope>provided</scope>
28+
<groupId>nl.myndocs</groupId>
29+
<artifactId>oauth2-server-json</artifactId>
30+
<version>${project.version}</version>
31+
<classifier>shaded</classifier>
3232
</dependency>
3333
</dependencies>
3434
</project>

oauth2-server-sparkjava/src/main/java/nl/myndocs/oauth2/sparkjava/request/SparkjavaCallContext.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package nl.myndocs.oauth2.sparkjava.request
22

3+
import nl.myndocs.oauth2.json.JsonMapper
34
import nl.myndocs.oauth2.request.CallContext
4-
import nl.myndocs.oauth2.sparkjava.json.JsonMapper
55
import spark.Request
66
import spark.Response
77

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
<modules>
1919
<module>oauth2-server-core</module>
20+
<module>oauth2-server-json</module>
2021
<module>oauth2-server-ktor</module>
2122
<module>oauth2-server-client-inmemory</module>
2223
<module>oauth2-server-identity-inmemory</module>

0 commit comments

Comments
 (0)