Lines Matching full:pom
138 type Pom struct { struct
139 XMLName xml.Name `xml:"http://maven.apache.org/POM/4.0.0 project"`
153 func (p Pom) IsAar() bool { argument
157 func (p Pom) IsJar() bool { argument
161 func (p Pom) MkName() string { argument
168 func (p Pom) MkJarDeps() []string { argument
172 func (p Pom) MkAarDeps() []string { argument
178 func (p Pom) MkDeps(typeExt string, scopes []string) []string { argument
195 func (p Pom) SdkVersion() string { argument
199 func (p Pom) Jetifier() bool { argument
203 func (p *Pom) FixDeps(modules map[string]*Pom) { argument
207 // We've seen the POM for this dependency, use its packaging
211 // Dependency type was not specified and we don't have the POM
270 func parse(filename string) (*Pom, error) {
276 var pom Pom
277 err = xml.Unmarshal(data, &pom)
282 if useVersion != "" && pom.Version != useVersion {
286 if pom.Packaging == "" {
287 pom.Packaging = "jar"
290 pom.PomFile = filename
291 pom.ArtifactFile = strings.TrimSuffix(filename, ".pom") + "." + pom.Packaging
293 return &pom, nil
352 The tool will extract the necessary information from *.pom files to create an Android.mk whose
372 If the maven directory contains multiple versions of artifacts and their pom files,
379 The directory to search for *.pom files under.
440 if strings.HasSuffix(name, ".pom") {
455 fmt.Fprintln(os.Stderr, "Error: no *.pom files found under", dir)
461 poms := []*Pom{}
462 modules := make(map[string]*Pom)
465 pom, err := parse(filename)
471 if pom != nil {
472 key := pom.MkName()
478 fmt.Fprintln(os.Stderr, "Module", key, "defined twice:", old.PomFile, pom.PomFile)
482 poms = append(poms, pom)
483 modules[key] = pom
490 for _, pom := range poms {
491 pom.FixDeps(modules)
498 for _, pom := range poms {
501 err = mkDepsTemplate.Execute(os.Stdout, pom)
503 err = mkTemplate.Execute(os.Stdout, pom)
506 fmt.Fprintln(os.Stderr, "Error writing", pom.PomFile, pom.MkName(), err)