aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/pom.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-10-03 20:13:27 -0400
committerEduardo Julian2020-10-03 20:13:27 -0400
commit2d16bdfa2854d851034eff9f042863dcceb8664a (patch)
treea1c593916c6ec9d6e9c132e641fc8b34b85a07f8 /stdlib/source/program/aedifex/pom.lux
parent618b1ce9743bb79f1ae3375b05a394a4183b21e8 (diff)
Gave Aedifex support for multiple profiles.
Diffstat (limited to 'stdlib/source/program/aedifex/pom.lux')
-rw-r--r--stdlib/source/program/aedifex/pom.lux31
1 files changed, 20 insertions, 11 deletions
diff --git a/stdlib/source/program/aedifex/pom.lux b/stdlib/source/program/aedifex/pom.lux
index 794ed7e12..9370620f5 100644
--- a/stdlib/source/program/aedifex/pom.lux
+++ b/stdlib/source/program/aedifex/pom.lux
@@ -1,15 +1,18 @@
(.module:
[lux #*
[control
- [pipe (#+ case>)]]
+ [pipe (#+ case>)]
+ ["." try (#+ Try)]
+ ["." exception]]
[data
["." maybe ("#@." functor)]
[format
["_" xml (#+ XML)]]
[collection
- ["." list ("#@." monoid functor)]]]]
+ ["." list ("#@." monoid functor)]
+ ["." set]]]]
["." // #_
- ["/" project]
+ ["/" profile]
["#." artifact (#+ Artifact)]
["#." dependency (#+ Repository Dependency)]])
@@ -110,11 +113,17 @@
))
(def: #export (project value)
- (-> /.Project XML)
- (#_.Node ["" "project"] _.attrs
- ($_ list@compose
- (list ..version)
- (..artifact (get@ #/.identity value))
- (|> value (get@ #/.repositories) (list@map ..repository) (..group "repositories") list)
- (|> value (get@ #/.dependencies) (list@map ..dependency) (..group "dependencies") list)
- )))
+ (-> /.Profile (Try XML))
+ (case (get@ #/.identity value)
+ (#.Some identity)
+ (#try.Success
+ (#_.Node ["" "project"] _.attrs
+ ($_ list@compose
+ (list ..version)
+ (..artifact identity)
+ (|> value (get@ #/.repositories) set.to-list (list@map ..repository) (..group "repositories") list)
+ (|> value (get@ #/.dependencies) set.to-list (list@map ..dependency) (..group "dependencies") list)
+ )))
+
+ _
+ (exception.throw /.no-identity [])))