@@ -40,7 +40,9 @@ from [kotlinx.serialization-json](https://github.com/Kotlin/kotlinx.serializatio
40
40
41
41
In order to use releases add Maven Central repository to the list of repositories.
42
42
43
- ##### Kotlin
43
+ ##### Gradle
44
+
45
+ ###### Kotlin
44
46
45
47
``` kotlin
46
48
repositories {
@@ -50,7 +52,7 @@ repositories {
50
52
implementation(" io.github.optimumcode:json-schema-validator:0.5.1" )
51
53
```
52
54
53
- ##### Groovy
55
+ ###### Groovy
54
56
55
57
``` groovy
56
58
repositories {
@@ -68,27 +70,60 @@ implementation("io.github.optimumcode:json-schema-validator")
68
70
_ Release are published to Sonatype repository. The synchronization with Maven Central takes time._
69
71
_ If you want to use the release right after the publication you should add Sonatype Release repository to your build script._
70
72
71
- ##### Kotlin
73
+ ###### Kotlin
72
74
73
75
``` kotlin
74
76
repositories {
75
77
maven(url = " https://s01.oss.sonatype.org/content/repositories/releases/" )
76
78
}
77
79
```
78
80
79
- ##### Groovy
81
+ ###### Groovy
80
82
81
83
``` groovy
82
84
repositories {
83
85
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
84
86
}
85
87
```
86
88
89
+ ##### Maven
90
+
91
+ You can also use ` json-schema-validator ` as a dependency in your maven project.
92
+ But Maven cannot use Gradle's metadata so you need to depend on a JVM-specific artifact in your project:
93
+
94
+ ``` xml
95
+ <dependency >
96
+ <groupId >io.github.optimumcode</groupId >
97
+ <artifactId >json-schema-validator-jvm</artifactId >
98
+ <version >0.5.1</version >
99
+ </dependency >
100
+ ```
101
+
102
+ And you can also add a sonatype repository to your POM file
103
+
104
+ ``` xml
105
+ <repositories >
106
+ <repository >
107
+ <id >sonatype-release</id >
108
+ <name >sonatype-release</name >
109
+ <url >https://s01.oss.sonatype.org/content/repositories/releases/</url >
110
+ <snapshots >
111
+ <enabled >false</enabled >
112
+ </snapshots >
113
+ <releases >
114
+ <enabled >true</enabled >
115
+ </releases >
116
+ </repository >
117
+ </repositories >
118
+ ```
119
+
87
120
#### Snapshots
88
121
89
122
_ If you want to use SNAPSHOT version you should add Sonatype Snapshot repository to your build script._
90
123
91
- ##### Kotlin
124
+ ##### Gradle
125
+
126
+ ###### Kotlin
92
127
93
128
``` kotlin
94
129
repositories {
@@ -103,7 +138,7 @@ implementation(platform("io.github.optimumcode:json-schema-validator-bom:0.5.2-S
103
138
implementation(" io.github.optimumcode:json-schema-validator" )
104
139
```
105
140
106
- ##### Groovy
141
+ ###### Groovy
107
142
108
143
``` groovy
109
144
repositories {
@@ -113,6 +148,36 @@ repositories {
113
148
implementation 'io.github.optimumcode:json-schema-validator:0.5.2-SNAPSHOT'
114
149
```
115
150
151
+ ##### Maven
152
+
153
+ For the Maven you need to add a snapshot repository to your POM file
154
+
155
+ ``` xml
156
+ <repositories >
157
+ <repository >
158
+ <id >sonatype</id >
159
+ <name >sonatype-snapshot</name >
160
+ <url >https://s01.oss.sonatype.org/content/repositories/snapshots/</url >
161
+ <snapshots >
162
+ <enabled >true</enabled >
163
+ </snapshots >
164
+ <releases >
165
+ <enabled >false</enabled >
166
+ </releases >
167
+ </repository >
168
+ </repositories >
169
+ ```
170
+
171
+ And then you can add a dependency to a SNAPSHOT version
172
+
173
+ ``` xml
174
+ <dependency >
175
+ <groupId >io.github.optimumcode</groupId >
176
+ <artifactId >json-schema-validator-jvm</artifactId >
177
+ <version >0.5.2-SNAPSHOT</version >
178
+ </dependency >
179
+ ```
180
+
116
181
### Example
117
182
118
183
If you have just one JSON schema or many independent schemes
0 commit comments