aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/pom.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-08-26 23:04:27 -0400
committerEduardo Julian2020-08-26 23:04:27 -0400
commitc8f9f42a258f1f2f961c7f8c5571cce843e97a0a (patch)
tree887cb4d557b149826c6c9e59ea821942045b08d4 /stdlib/source/program/aedifex/pom.lux
parentd77ce19bf01a009cf5255e0a5d8201d8cc2f2178 (diff)
Download and catch dependencies in Aedifex.
Diffstat (limited to 'stdlib/source/program/aedifex/pom.lux')
-rw-r--r--stdlib/source/program/aedifex/pom.lux27
1 files changed, 13 insertions, 14 deletions
diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux
index 102728e1e..794ed7e12 100644
--- a/stdlib/source/program/aedifex/pom.lux
+++ b/stdlib/source/program/aedifex/pom.lux
@@ -8,17 +8,16 @@
["_" xml (#+ XML)]]
[collection
["." list ("#@." monoid functor)]]]]
- [//
- ["/" project]])
+ ["." // #_
+ ["/" project]
+ ["#." artifact (#+ Artifact)]
+ ["#." dependency (#+ Repository Dependency)]])
## https://maven.apache.org/pom.html
(def: #export file
"pom.xml")
-(def: #export extension
- ".pom")
-
(def: version
XML
(#_.Node ["" "modelVersion"] _.attrs
@@ -31,10 +30,10 @@
(list (#_.Text value))))
(def: (artifact value)
- (-> /.Artifact (List XML))
- (list (..property "groupId" (get@ #/.group value))
- (..property "artifactId" (get@ #/.name value))
- (..property "version" (get@ #/.version value))))
+ (-> Artifact (List XML))
+ (list (..property "groupId" (get@ #//artifact.group value))
+ (..property "artifactId" (get@ #//artifact.name value))
+ (..property "version" (get@ #//artifact.version value))))
(def: distribution
(-> /.Distribution XML)
@@ -50,17 +49,17 @@
(#_.Node ["" "license"] _.attrs)))
(def: repository
- (-> /.Repository XML)
+ (-> Repository XML)
(|>> (..property "url")
list
(#_.Node ["" "repository"] _.attrs)))
-(def: (dependency [artifact type])
- (-> /.Dependency XML)
+(def: (dependency value)
+ (-> Dependency XML)
(#_.Node ["" "dependency"]
_.attrs
- (list@compose (..artifact artifact)
- (list (..property "type" type)))))
+ (list@compose (..artifact (get@ #//dependency.artifact value))
+ (list (..property "type" (get@ #//dependency.type value))))))
(def: scm
(-> /.SCM XML)