()
| 14 | ) |
| 15 | |
| 16 | func init() { |
| 17 | |
| 18 | // register default maven repository |
| 19 | java.RegisterMavenRepo( |
| 20 | common.RepoConfig{Url: "https://maven.aliyun.com/repository/public"}, |
| 21 | common.RepoConfig{Url: "https://repo1.maven.org/maven2"}, |
| 22 | // custom maven repostiory like nexus |
| 23 | common.RepoConfig{Url: "", Username: "", Password: ""}, |
| 24 | ) |
| 25 | |
| 26 | // register maven component repository origin |
| 27 | java.RegisterMavenOrigin(func(groupId, artifactId, version string) *java.Pom { |
| 28 | var pom *java.Pom |
| 29 | java.DownloadPomFromRepo(java.PomDependency{GroupId: groupId, ArtifactId: artifactId, Version: version}, func(r io.Reader) { pom = java.ReadPom(r) }) |
| 30 | return pom |
| 31 | }) |
| 32 | } |
| 33 | |
| 34 | func main() { |
| 35 |
nothing calls this directly
no test coverage detected