From 2d16bdfa2854d851034eff9f042863dcceb8664a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 3 Oct 2020 20:13:27 -0400 Subject: Gave Aedifex support for multiple profiles. --- stdlib/source/program/aedifex/pom.lux | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'stdlib/source/program/aedifex/pom.lux') 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 []))) -- cgit v1.2.3