relpipe-data/examples/maven-filesystem-xpath.sh
author František Kučera <franta-hg@frantovo.cz>
Mon, 21 Feb 2022 00:43:11 +0100
branchv_0
changeset 329 5bc2bb8b7946
permissions -rwxr-xr-x
Release v0.18

#!/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