Skip to content

Commit 46168ba

Browse files
committed
update snapshots usage doc
1 parent 81f1d02 commit 46168ba

1 file changed

Lines changed: 31 additions & 51 deletions

File tree

README.md

Lines changed: 31 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -137,86 +137,66 @@ Spock-junit5 | `ru.vyarus:spock-junit5`
137137
### Snapshots
138138

139139
<details>
140-
<summary>Snapshots may be used through JitPack</summary>
140+
<summary>Snapshots published into Maven Central</summary>
141141

142-
Add [JitPack](https://jitpack.io/#ru.vyarus/dropwizard-guicey) repository:
142+
Add maven snapshots repository:
143143

144144
```groovy
145-
repositories { maven { url 'https://jitpack.io' } }
145+
repositories {
146+
mavenLocal()
147+
mavenCentral()
148+
maven {
149+
name = 'Central Portal Snapshots'
150+
url = 'https://central.sonatype.com/repository/maven-snapshots/'
151+
mavenContent {
152+
snapshotsOnly()
153+
includeGroupAndSubgroups('ru.vyarus')
154+
}
155+
}
156+
}
146157
```
147158

148-
For spring dependencies plugin (when guicey pom used as BOM):
159+
Use snapshot version:
149160

150161
```groovy
151-
dependencyManagement {
152-
resolutionStrategy {
153-
cacheChangingModulesFor 0, 'seconds'
154-
}
155-
imports {
156-
mavenBom "ru.vyarus:dropwizard-guicey:master-SNAPSHOT"
157-
}
162+
dependencies {
163+
implementation 'ru.vyarus:dropwizard-guicey:6.3.2-SNAPSHOT'
158164
}
159-
```
165+
```
160166

161-
For direct guicey dependency:
167+
To avoid caching you may use:
162168

163169
```groovy
164170
configurations.all {
165171
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
166172
}
167-
168-
dependencies {
169-
implementation 'ru.vyarus:dropwizard-guicey:master-SNAPSHOT'
170-
}
171173
```
172174

173-
Note that in both cases `resolutionStrategy` setting required for correct updating snapshot with recent commits
174-
(without it you will not always have up-to-date snapshot)
175-
176-
OR you can depend on exact commit:
177-
178-
* Go to [JitPack project page](https://jitpack.io/#ru.vyarus/dropwizard-guicey)
179-
* Select `Commits` section and click `Get it` on commit you want to use and
180-
use commit hash as version: `ru.vyarus:dropwizard-guicey:56537f7d23`
181-
182-
183175
Maven:
184176

185177
```xml
186178
<repositories>
187179
<repository>
188-
<id>jitpack.io</id>
189-
<url>https://jitpack.io</url>
180+
<name>Central Portal Snapshots</name>
181+
<id>central-portal-snapshots</id>
182+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
183+
<releases>
184+
<enabled>false</enabled>
185+
</releases>
186+
<snapshots>
187+
<enabled>true</enabled>
188+
</snapshots>
190189
</repository>
191-
</repositories>
192-
193-
<dependencyManagement>
194-
<dependencies>
195-
<dependency>
196-
<groupId>ru.vyarus</groupId>
197-
<artifactId>dropwizard-guicey</artifactId>
198-
<version>master-SNAPSHOT</version>
199-
<type>pom</type>
200-
<scope>import</scope>
201-
</dependency>
202-
</dependencies>
203-
</dependencyManagement>
204-
205-
<dependencies>
206-
<dependency>
207-
<groupId>ru.vyarus</groupId>
208-
<artifactId>dropwizard-guicey</artifactId>
209-
</dependency>
210-
</dependencies>
190+
</repositories>
211191
```
212192

213-
Or simply change version if used as direct dependency (repository must be also added):
193+
Use shapshot version:
214194

215195
```xml
216196
<dependency>
217197
<groupId>ru.vyarus</groupId>
218198
<artifactId>dropwizard-guicey</artifactId>
219-
<version>master-SNAPSHOT</version>
199+
<version>6.3.2-SNAPSHOT</version>
220200
</dependency>
221201
```
222202

0 commit comments

Comments
 (0)