spring-cloud-contract
spring-cloud-contract copied to clipboard
Maven plugin is not using maven repositories
Describe the bug
contractsRepositoryUrl: URL to a repository with the artifacts that have contracts. If it is not provided, use the current Maven ones.
I've tried adding repositories to the maven project and to settings but none of those work.
Instead I see
[DEBUG] Using the following remote repos [remote0 (jar:file:/home/jakub/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.15.4/jackson-databind-2.15.4.jar!/META-INF/versions/9/, default, releases+snapshots)]
which makes no sense.
The downloading stubs fails with:
[DEBUG] Could not obtain transporter factory for remote0 (jar:file:/home/jakub/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.15.4/jackson-databind-2.15.4.jar!/META-INF/versions/9/, default, releases+snapshots)
org.eclipse.aether.transfer.NoTransporterException: Unsupported transport protocol jar
It works if I set the contractsRepositoryUrl
(and credentials) manually in the plugin.
But I'd rather not repeat the repository configuration there and use the built in maven mechanism for resolving dependencies.
It's all rather confusing. I'm building with Maven, why do I have to setup this artifact resolution manually?