Last active
December 5, 2017 00:41
-
-
Save EronWright/c03fef714c23b5dea59abc022137d945 to your computer and use it in GitHub Desktop.
Example of forcing a specific snapshot version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gradlew --version | |
------------------------------------------------------------ | |
Gradle 3.5 | |
------------------------------------------------------------ | |
$ gradlew dependencies --configuration compile | |
:dependencies | |
------------------------------------------------------------ | |
Root project | |
------------------------------------------------------------ | |
compile - Dependencies for source set 'main' (deprecated, use 'implementation ' instead). | |
\--- org.zenframework.easy-services:easy-services-js:1.0.0-SNAPSHOT -> 1.0.0-20170814.105643-1 | |
+--- org.zenframework.easy-services:easy-services-config:1.0.0-SNAPSHOT -> 1.0.0-20170814.105639-1 | |
| \--- org.slf4j:slf4j-api:[1.7,) -> 1.8.0-beta0 | |
+--- org.zenframework.easy-services:easy-services-resource:1.0.0-SNAPSHOT -> 1.0.0-20170814.105616-1 | |
| +--- org.zenframework.easy-services:easy-services-config:1.0.0-SNAPSHOT -> 1.0.0-20170814.105639-1 (*) | |
| +--- org.zenframework.easy-services:easy-services-util:1.0.0-SNAPSHOT -> 1.0.0-20170814.105626-1 | |
| | +--- commons-lang:commons-lang:2.6 | |
| | +--- commons-io:commons-io:2.5 | |
| | \--- org.slf4j:slf4j-api:[1.7,) -> 1.8.0-beta0 | |
| \--- org.slf4j:slf4j-api:[1.7,) -> 1.8.0-beta0 | |
+--- org.zenframework.easy-services:easy-services-util:1.0.0-SNAPSHOT -> 1.0.0-20170814.105626-1 (*) | |
+--- org.apache.commons:commons-pool2:2.4.2 | |
\--- org.slf4j:slf4j-api:[1.7,) -> 1.8.0-beta0 | |
(*) - dependencies omitted (listed previously) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// notes: | |
// https://maven.apache.org/pom.html#Version_Order_Specification | |
// http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-syntax.html | |
apply plugin: 'java' | |
repositories { | |
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } | |
mavenCentral() | |
} | |
dependencies { | |
compile "org.zenframework.easy-services:easy-services-js:1.0.0-SNAPSHOT" | |
} | |
configurations.all { | |
resolutionStrategy { | |
// force a specific snapshot version | |
// https://oss.sonatype.org/content/repositories/snapshots/org/zenframework/easy-services/ | |
force 'org.zenframework.easy-services:easy-services-js:1.0.0-SNAPSHOT', 'org.zenframework.easy-services:easy-services-js:1.0.0-20170814.105643-1' | |
force 'org.zenframework.easy-services:easy-services-config:1.0.0-SNAPSHOT', 'org.zenframework.easy-services:easy-services-config:1.0.0-20170814.105639-1' | |
force 'org.zenframework.easy-services:easy-services-resource:1.0.0-SNAPSHOT', 'org.zenframework.easy-services:easy-services-resource:1.0.0-20170814.105616-1' | |
force 'org.zenframework.easy-services:easy-services-util:1.0.0-SNAPSHOT', 'org.zenframework.easy-services:easy-services-util:1.0.0-20170814.105626-1' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rootProject.name = 'snapshot-versioning' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment