relpipe-data/examples/maven-filesystem-xpath.sh
branchv_0
changeset 329 5bc2bb8b7946
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/relpipe-data/examples/maven-filesystem-xpath.sh	Mon Feb 21 00:43:11 2022 +0100
@@ -0,0 +1,14 @@
+#!/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