@@ -40,7 +40,9 @@ from [kotlinx.serialization-json](https://github.com/Kotlin/kotlinx.serializatio
4040
4141In order to use releases add Maven Central repository to the list of repositories.
4242
43- ##### Kotlin
43+ ##### Gradle
44+
45+ ###### Kotlin
4446
4547``` kotlin
4648repositories {
@@ -50,7 +52,7 @@ repositories {
5052implementation(" io.github.optimumcode:json-schema-validator:0.5.1" )
5153```
5254
53- ##### Groovy
55+ ###### Groovy
5456
5557``` groovy
5658repositories {
@@ -68,27 +70,60 @@ implementation("io.github.optimumcode:json-schema-validator")
6870_ Release are published to Sonatype repository. The synchronization with Maven Central takes time._
6971_ If you want to use the release right after the publication you should add Sonatype Release repository to your build script._
7072
71- ##### Kotlin
73+ ###### Kotlin
7274
7375``` kotlin
7476repositories {
7577 maven(url = " https://s01.oss.sonatype.org/content/repositories/releases/" )
7678}
7779```
7880
79- ##### Groovy
81+ ###### Groovy
8082
8183``` groovy
8284repositories {
8385 maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
8486}
8587```
8688
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+
87120#### Snapshots
88121
89122_ If you want to use SNAPSHOT version you should add Sonatype Snapshot repository to your build script._
90123
91- ##### Kotlin
124+ ##### Gradle
125+
126+ ###### Kotlin
92127
93128``` kotlin
94129repositories {
@@ -103,7 +138,7 @@ implementation(platform("io.github.optimumcode:json-schema-validator-bom:0.5.2-S
103138implementation(" io.github.optimumcode:json-schema-validator" )
104139```
105140
106- ##### Groovy
141+ ###### Groovy
107142
108143``` groovy
109144repositories {
@@ -113,6 +148,36 @@ repositories {
113148implementation 'io.github.optimumcode:json-schema-validator:0.5.2-SNAPSHOT'
114149```
115150
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+
116181### Example
117182
118183If you have just one JSON schema or many independent schemes
0 commit comments