MCPcopy Create free account
hub / github.com/XmirrorSecurity/OpenSCA-cli / init

Function init

example/java/main.go:16–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14)
15
16func 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
34func main() {
35

Callers

nothing calls this directly

Calls 4

RegisterMavenRepoFunction · 0.92
RegisterMavenOriginFunction · 0.92
DownloadPomFromRepoFunction · 0.92
ReadPomFunction · 0.92

Tested by

no test coverage detected