Skip to content

Commit eeaa133

Browse files
authored
Fixes for Maven 3.10.x (Resolver 2.x) (#420)
Changes: * Resolver 2.x removed the simple "change detection", it installs when told to do so * Resolver 2.x renamed `HttpTransporter` into `ApacheTransporter` as it has several HTTP transporters.
1 parent fdc2f1a commit eeaa133

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4368TimestampAwareArtifactInstallerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
public class MavenITmng4368TimestampAwareArtifactInstallerTest extends AbstractMavenIntegrationTestCase {
3434

3535
public MavenITmng4368TimestampAwareArtifactInstallerTest() {
36-
super("[2.0.3,3.0-alpha-1),[3.0-alpha-6,)");
36+
super("[2.0.3,3.0-alpha-1),[3.0-alpha-6,3.10.0-SNAPSHOT)");
3737
}
3838

3939
/**

core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7470ResolverTransportTest.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,19 @@ private void performTest(/* nullable */ final String transport, final String log
100100

101101
private static final String WAGON_LOG_SNIPPET = "[DEBUG] Using transporter WagonTransporter";
102102

103-
private static final String NATIVE_LOG_SNIPPET = "[DEBUG] Using transporter HttpTransporter";
103+
// Resolver1: HttpTransporter
104+
private static final String NATIVE_R1_LOG_SNIPPET = "[DEBUG] Using transporter HttpTransporter";
105+
106+
// Resolver2: renamed to ApacheTransporter
107+
private static final String NATIVE_R2_LOG_SNIPPET = "[DEBUG] Using transporter ApacheTransporter";
104108

105109
@Test
106110
public void testResolverTransportDefault() throws Exception {
107-
performTest(null, NATIVE_LOG_SNIPPET);
111+
if (matchesVersionRange("[3.9.0,3.10.0)")) {
112+
performTest(null, NATIVE_R1_LOG_SNIPPET);
113+
} else {
114+
performTest(null, NATIVE_R2_LOG_SNIPPET);
115+
}
108116
}
109117

110118
@Test
@@ -114,6 +122,10 @@ public void testResolverTransportWagon() throws Exception {
114122

115123
@Test
116124
public void testResolverTransportNative() throws Exception {
117-
performTest("native", NATIVE_LOG_SNIPPET);
125+
if (matchesVersionRange("[3.9.0,3.10.0)")) {
126+
performTest("native", NATIVE_R1_LOG_SNIPPET);
127+
} else {
128+
performTest("native", NATIVE_R2_LOG_SNIPPET);
129+
}
118130
}
119131
}

0 commit comments

Comments
 (0)