Which annotation are you using (or maybe, which tool and version)?
I ask because I can’t find the @Repository annotation as you describe. I’m probably looking in the wrong place.
I did find this @Repository annotation that takes a value, an id, and a url. It’s deprecated and so I don’t think it’s the same one you’re using.
Here are some examples of usage of this annotation:
As you can see, it’s something official from the kotlin-scriptsub project.
This repository interface can be found in this package: kotlin.script.experimental.dependencies
I could get the decompiled version from my IDE:
package kotlin.script.experimental.dependencies
@kotlin.annotation.Target @kotlin.annotation.Repeatable @kotlin.annotation.Retention public final annotation class Repository public constructor(vararg repositoriesCoordinates: kotlin.String, options: kotlin.Array<kotlin.String> /* = compiled code */) : kotlin.Annotation {
public final val options: kotlin.Array<kotlin.String> /* compiled code */
public final val repositoriesCoordinates: kotlin.Array<out kotlin.String> /* compiled code */
}
I’m not sure.
It looks like the MavenDepencyResolver checks if the coordinate is a MavenRepositoryCoordinate and pulls the pass/username from that.
But I don’t see where a coordinate like this is created. Here you can see a repo coordinate is being created with the string from the annotation, but that method only creates a generic repo coordinate not a MavenRepositoryCooridate.
Maybe someone else knows where to look for how one uses a @Repository with a MavenRepositoryCoordinate?