You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/05/11 08:35:24 UTC

[GitHub] [maven-integration-testing] cstamas commented on a diff in pull request #158: [MNG-7470] mvn 3.9+ IT that uses wagon (default) and native transport

cstamas commented on code in PR #158:
URL: https://github.com/apache/maven-integration-testing/pull/158#discussion_r870024752


##########
core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7470ResolverTransportTest.java:
##########
@@ -0,0 +1,89 @@
+package org.apache.maven.it;
+
+import java.io.File;
+import java.util.HashMap;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-7470">MNG-7470</a>:
+ * check that Maven two bundled transports works as expected.
+ */
+public class MavenITmng7470ResolverTransportTest
+        extends AbstractMavenIntegrationTestCase
+{
+    public MavenITmng7470ResolverTransportTest()
+    {
+        super( "[3.9.0,)" );
+    }
+
+    public void testResolverTransportWagon()
+            throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-7470-resolver-transport" );
+
+        HttpServer server = HttpServer.builder()
+                .port( 0 )
+                .source( new File( testDir, "repo" ) )
+                .build();
+        server.start();
+        try
+        {
+            Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+            HashMap<String, String> properties = new HashMap<>();
+            properties.put( "@port@", Integer.toString( server.port() ) );
+            verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", properties );
+
+            verifier = newVerifier( new File( testDir, "wagon" ).getAbsolutePath() );
+            verifier.deleteDirectory( "target" );
+            verifier.deleteArtifacts( "org.apache.maven.its.resolver-transport.wagon" );
+            verifier.addCliOption( "-X" );
+            verifier.addCliOption("-s" );
+            verifier.addCliOption(new File( testDir, "settings.xml" ).getAbsolutePath() );

Review Comment:
   > Where is the verification that the transport actually works, i.e., the right one is picked?
   
   Maven build fails if project deps cannot be resolved... is that what you asking?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org