|
6 | 6 | public class MaveniverseDemo { |
7 | 7 | final List<ModuleLookup> lookups = |
8 | 8 | List.of( |
9 | | - ModuleLookup.ofJUnit("6.1.0-SNAPSHOT"), |
| 9 | + // JitPack GAV - https://docs.jitpack.io/intro/#building-with-jitpack |
| 10 | + // ModuleLookup.of("junit-start", "experiments~junit-onramp-SNAPSHOT") |
| 11 | + // .withRepository("https://jitpack.io") |
| 12 | + // .withBill("com.github.junit-team.junit-framework:junit-bom:{{version}}") |
| 13 | + // .withRoot("com.github.junit-team.junit-framework:junit-start") |
| 14 | + // Special Snowflake |
| 15 | + ModuleLookup.of("junit-start", "6.1.0-SNAPSHOT") |
| 16 | + .withRepository("https://central.sonatype.com/repository/maven-snapshots") |
| 17 | + .withBill("org.junit:junit-bom:{{version}}") |
| 18 | + .withRoot("org.junit:junit-start"), |
| 19 | + // Snapshot |
| 20 | + ModuleLookup.ofJUnit("6.1.0-SNAPSHOT").withRoot("org.junit:junit-start:{{version}}"), |
| 21 | + // Releases and Pre-Releases |
10 | 22 | ModuleLookup.ofJUnit("6.0.1"), |
11 | 23 | ModuleLookup.ofJUnit("5.14.1"), |
12 | 24 | ModuleLookup.ofJUnit("6.0.0"), |
@@ -57,11 +69,7 @@ public class MaveniverseDemo { |
57 | 69 | ModuleLookup.ofJUnit("5.9.0-M1"), |
58 | 70 | ModuleLookup.ofJUnit("5.8.2"), |
59 | 71 | ModuleLookup.ofJUnit("5.8.1"), |
60 | | - ModuleLookup.ofJUnit("5.8.0"), // not going before 5.8.0, as Suite was introduced here |
61 | | - ModuleLookup.of("junit-start", "experiments~junit-onramp-SNAPSHOT") |
62 | | - .withRepository("https://jitpack.io") |
63 | | - .withBill("com.github.junit-team.junit-framework:junit-bom:{{version}}") |
64 | | - .withRoot("com.github.junit-team.junit-framework:junit-start")); |
| 72 | + ModuleLookup.ofJUnit("5.8.0")); // not going before 5.8.0, as Suite was introduced here |
65 | 73 |
|
66 | 74 | void main() throws Exception { |
67 | 75 | var base = "https://repo.maven.apache.org/maven2/eu/maveniverse/maven/plugins/toolbox/"; |
@@ -110,7 +118,9 @@ private static String computeProperty(List<String> strings) { |
110 | 118 | return moduleName + "=" + originUri; |
111 | 119 | } |
112 | 120 |
|
113 | | - private static String computeModuleName(String name) { |
| 121 | + private static String computeModuleName(String string) { |
| 122 | + var space = string.indexOf(' '); // Cut off trailing suffixes, like " [automatic; ..." |
| 123 | + var name = space == -1 ? string : string.substring(0, space); |
114 | 124 | return ModuleDescriptor.newModule(name).build().name(); |
115 | 125 | } |
116 | 126 |
|
|
0 commit comments