#!/bin/bash
# replaces multiple: --option 'env:xmlns_m' 'http://maven.apache.org/POM/4.0.0'
export xmlns_m='http://maven.apache.org/POM/4.0.0'
find -name pom.xml -print0 \
| relpipe-in-filesystem \
--relation 'maven' \
--file path --as 'module' \
--script xpath --option 'env:xpath' '/m:project/m:groupId' --as 'groupId' \
--script xpath --option 'env:xpath' '/m:project/m:artifactId' --as 'artifactId' \
--script xpath --option 'env:xpath' '/m:project/m:version' --as 'version' \
--hash sha256 \
| relpipe-out-tabular