{"record":{"id":"d9328100f121f0e5","repo":"apache/maven","slug":"unsupported-remote-repository","errorCode":null,"errorMessage":"Unsupported remote repository","messagePattern":"Unsupported remote repository","errorType":"exception","errorClass":"TransportProviderException","httpStatus":null,"severity":"error","filePath":"impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultTransportProvider.java","lineNumber":59,"sourceCode":"\n    @Inject\n    public DefaultTransportProvider(TransporterProvider transporterProvider) {\n        this.transporterProvider = requireNonNull(transporterProvider);\n    }\n\n    @Override\n    public Transport transport(Session session, RemoteRepository repository) {\n        try {\n            URI baseURI = new URI(repository.getUrl());\n            return new DefaultTransport(\n                    baseURI,\n                    transporterProvider.newTransporter(\n                            InternalSession.from(session).getSession(),\n                            ((DefaultRemoteRepository) repository).getRepository()));\n        } catch (URISyntaxException e) {\n            throw new TransportProviderException(\"Remote repository URL invalid\", e);\n        } catch (NoTransporterException e) {\n            throw new TransportProviderException(\"Unsupported remote repository\", e);\n        }\n    }\n}\n","sourceCodeStart":41,"sourceCodeEnd":63,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultTransportProvider.java#L41-L63","documentation":"When DefaultTransportProvider.transport asks the resolver for a transporter, org.eclipse.aether.transporterProvider.newTransporter throws NoTransporterException if no registered transport factory supports the repository's protocol. The wrapper TransportProviderException(\"Unsupported remote repository\") therefore means: no transport module on the classpath handles this URL scheme. Out of the box Maven supports http/https (and file/classpath only when the corresponding resolver transport modules are registered).","triggerScenarios":"transport(session, repo) for a repository with url 'scp://...', 'svn://...', 'ftp://...', or 's3://...' with no matching provider; 'file://...' or classpath repos in a minimal embedding where aether-transport-file/classpath is not wired into the injector; http repositories when the HTTP transporter was deliberately excluded.","commonSituations":"Legacy poms referencing scp:// or svn:// repositories (old Codehaus/Java.net style); embedders assembling a stripped-down resolver without transport modules; scheme typos like 'htps://' that match no factory.","solutions":["Switch the repository URL to http/https, which the default HTTP transport supports","In embedded setups, register the needed transport: org.eclipse.aether:aether-transport-file / aether-transport-classpath / aether-transport-http (or a wagon provider) in the injector/container","Check the URL scheme for typos and trailing garbage so it matches a registered transport"],"exampleFix":"<!-- before -->\n<pluginRepositories>\n  <pluginRepository>\n    <id>old</id>\n    <url>scp://build.example.com/m2/plugins</url>\n  </pluginRepository>\n</pluginRepositories>\n\n<!-- after -->\n<pluginRepositories>\n  <pluginRepository>\n    <id>old</id>\n    <url>https://build.example.com/m2/plugins</url>\n  </pluginRepository>\n</pluginRepositories>","handlingStrategy":"validation","validationCode":"static final Set<String> SUPPORTED = Set.of(\"http\", \"https\", \"file\", \"classpath\"); // adjust to registered transports\nString scheme = URI.create(repository.getUrl()).getScheme();\nif (scheme == null || !SUPPORTED.contains(scheme.toLowerCase(Locale.ROOT))) {\n    throw new IllegalArgumentException(\"No transport for scheme '\" + scheme + \"' of \" + repository.getUrl());\n}\ntransportProvider.transport(session, repository);","typeGuard":null,"tryCatchPattern":"try {\n    return transportProvider.transport(session, repository);\n} catch (TransportProviderException e) {\n    if (e.getCause() instanceof NoTransporterException) {\n        // fall back to an https mirror, or register the matching transport module\n        return transportProvider.transport(session, httpsMirrorOf(repository));\n    }\n    throw e;\n}","preventionTips":["Standardize repositories on http/https","In embedded resolver setups, explicitly register aether-transport-http/file/classpath in the injector","Add a startup check listing each repository's scheme against the transports you actually registered"],"tags":["maven","resolver","repository","protocol","transport","classpath"],"backgroundTag":"unsupported-protocol","analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}