ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Vernum <Tim.Ver...@macquarie.com.au>
Subject RE: [VOTE] The late stuff
Date Thu, 03 May 2001 10:34:47 GMT
From: Rob van Oostrum [mailto:rvanoostrum@ezgov.com]

> My master build file invokes my generic app build script passing the
> project name as a property. So the name of the property in 
> the generic app
> script is httpd.service.name.${project.name}

> So rather than have a httpd.service.name
> property, I call it httpd.service.name.[project name]. 
> Developers can then
> go into a file build.properties and override for example the
> httpd.service.name.coreapp property, without affecting their 
> builds of any other app.

Based upon what I understand of your use case, I created the
attached task.

It actually works in a reverse order, so you would have:
  ${projectname}.httpd.service.name
(etc)

What it does instead of having recursive property evaluation,
is treat the property space as a hierarchy, and allows you
to copy from one tree to another.

eg:
 You might have a project called "BitWhizz", and then you can do
      <copy-properties from="BitWhizz" to="main"/>
 and everything in the BitWhizz.* property heirarchy would then
 be duplicated as main.*

 eg BitWhizz.httpd.service.name would be copied to
    main.httpd.service.name

That should suit your use case.
The xml file attached is a buildfile, that demonstrates this.

Sorry, no docs or comments just yet.
If it does meet your requirements, then I'll look into making
it a bit more "real".


begin 600 CopyProperty.java
M+RH-"B`J(%1H92!!<&%C:&4@4V]F='=A<F4@3&EC96YS92P@5F5R<VEO;B`Q
M+C$-"B`J#0H@*B!#;W!Y<FEG:'0@*&,I(#$Y.3D@5&AE($%P86-H92!3;V9T
M=V%R92!&;W5N9&%T:6]N+B`@06QL(')I9VAT<PT*("H@<F5S97)V960N#0H@
M*@T*("H@4F5D:7-T<FEB=71I;VX@86YD('5S92!I;B!S;W5R8V4@86YD(&)I
M;F%R>2!F;W)M<RP@=VET:"!O<B!W:71H;W5T#0H@*B!M;V1I9FEC871I;VXL
M(&%R92!P97)M:71T960@<')O=FED960@=&AA="!T:&4@9F]L;&]W:6YG(&-O
M;F1I=&EO;G,-"B`J(&%R92!M970Z#0H@*@T*("H@,2X@4F5D:7-T<FEB=71I
M;VYS(&]F('-O=7)C92!C;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B07!A8VAE(%-O9G1W87)E#0H@*B`@("!&;W5N9&%T:6]N(B!M=7-T(&YO
M="!B92!U<V5D('1O(&5N9&]R<V4@;W(@<')O;6]T92!P<F]D=6-T<R!D97)I
M=F5D#0H@*B`@("!F<F]M('1H:7,@<V]F='=A<F4@=VET:&]U="!P<FEO<B!W
M<FET=&5N('!E<FUI<W-I;VXN($9O<B!W<FET=&5N#0H@*B`@("!P97)M:7-S
M:6]N+"!P;&5A<V4@8V]N=&%C="!A<&%C:&5`87!A8VAE+F]R9RX-"B`J#0H@
M*B`U+B!0<F]D=6-T<R!D97)I=F5D(&9R;VT@=&AI<R!S;V9T=V%R92!M87D@
M;F]T(&)E(&-A;&QE9"`B07!A8VAE(@T*("H@("`@;F]R(&UA>2`B07!A8VAE
M(B!A<'!E87(@:6X@=&AE:7(@;F%M97,@=VET:&]U="!P<FEO<B!W<FET=&5N
M#0H@*B`@("!P97)M:7-S:6]N(&]F('1H92!!<&%C:&4@1W)O=7`N#0H@*@T*
M("H@5$A)4R!33T945T%212!)4R!04D]6241%1"!@8$%3($E3)R<@04Y$($%.
M62!%6%!215-3140@3U(@24U03$E%1`T*("H@5T%24D%.5$E%4RP@24Y#3%5$
M24Y'+"!"550@3D]4($Q)34E4140@5$\L(%1(12!)35!,245$(%=!4E)!3E1)
M15,-"B`J($]&($U%4D-(04Y404))3$E462!!3D0@1DE43D534R!&3U(@02!0
M05)424-53$%2(%!54E!/4T4@05)%#0H@*B!$25-#3$%)345$+B`@24X@3D\@
M159%3E0@4TA!3$P@5$A%($%004-(12!33T945T%212!&3U5.1$%424].($]2
M#0H@*B!)5%,@0T].5%))0E543U)3($)%($Q)04),12!&3U(@04Y9($1)4D5#
M5"P@24Y$25)%0U0L($E.0TE$14Y404PL#0H@*B!34$5#24%,+"!%6$5-4$Q!
M4EDL($]2($-/3E-%455%3E1)04P@1$%-04=%4R`H24Y#3%5$24Y'+"!"550@
M3D]4#0H@*B!,24U)5$5$(%1/+"!04D]#55)%345.5"!/1B!354)35$E4551%
M($=/3T13($]2(%-%4E9)0T53.R!,3U-3($]&#0H@*B!54T4L($1!5$$L($]2
M(%!23T9)5%,[($]2($)54TE.15-3($E.5$524E505$E/3BD@2$]7159%4B!#
M0553140@04Y$#0H@*B!/3B!!3ED@5$A%3U)9($]&($Q)04))3$E462P@5TA%
M5$A%4B!)3B!#3TY44D%#5"P@4U1224-4($Q)04))3$E462P-"B`J($]2(%1/
M4E0@*$E.0TQ51$E.1R!.14=,24=%3D-%($]2($]42$525TE312D@05))4TE.
M1R!)3B!!3ED@5T%9($]55`T*("H@3T8@5$A%(%5312!/1B!42$E3(%-/1E17
M05)%+"!%5D5.($E&($%$5DE3140@3T8@5$A%(%!/4U-)0DE,2519($]&#0H@
M*B!354-(($1!34%'12X-"B`J(#T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]#0H@
M*@T*("H@5&AI<R!S;V9T=V%R92!C;VYS:7-T<R!O9B!V;VQU;G1A<GD@8V]N
M=')I8G5T:6]N<R!M861E(&)Y(&UA;GD-"B`J(&EN9&EV:61U86QS(&]N(&)E
M:&%L9B!O9B!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VXN("!&;W(@
M;6]R90T*("H@:6YF;W)M871I;VX@;VX@=&AE($%P86-H92!3;V9T=V%R92!&
M;W5N9&%T:6]N+"!P;&5A<V4@<V5E#0H@*B`\:'1T<#HO+W=W=RYA<&%C:&4N
M;W)G+SXN#0H@*B\-"@T*<&%C:V%G92!O<F<N87!A8VAE+G1O;VQS+F%N="YT
M87-K9&5F<RYO<'1I;VYA;"`[#0H-"FEM<&]R="!O<F<N87!A8VAE+G1O;VQS
M+F%N="XJ.PT*:6UP;W)T(&]R9RYA<&%C:&4N=&]O;',N86YT+G1Y<&5S+E!A
M=&@[#0II;7!O<G0@;W)G+F%P86-H92YT;V]L<RYA;G0N='EP97,N4F5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%!R;W!E<G1I97,H*2`[#0H@
M("`@("`@($5N=6UE<F%T:6]N(&5N=6T@/2!P<F]P<RYK97ES*"D@.PT*("`@
M("`@("!(87-H=&%B;&4@861D(#T@;F5W($AA<VAT86)L92@I(#L-"B`@("`@
M("`@#0H)4W1R:6YG(&ME>49R;VT@/2!F<F]M("L@(BXB(#L-"@E3=')I;F<@
M:V5Y5&\@/2!T;R`K("(N(B`[#0H-"B`@("`@("`@+RH@5&AE(&%D9&ET:6]N
M(&ES(&1O;F4@:6X@='=O('-T97!S+"!B96-A=7-E($DG;2!N;W0@<W5R92!T
M:&%T#0H@("`@("`@("`@($AA<VAT86)L92!H86YD;&5S('1H92!A9&1I=&EO
M;B!O9B!E;&5M96YT<R!W:&EL92!I="=S(&ET97)A=&EN9R`J+PT*("`@("`@
M("!W:&EL92@@96YU;2YH87--;W)E16QE;65N=',H*2`I#0H@("`@("`@('L-
M"B`@("`@("`@("`@(%-T<FEN9R!K97D@/2`H4W1R:6YG*65N=6TN;F5X=$5L
M96UE;G0H*2`[#0H@("`@("`@("`@("!/8FIE8W0@=F%L=64@/2!P<F]P<RYG
M970H(&ME>2`I(#L-"@T*"2`@("!I9B@@:V5Y+G-T87)T<U=I=&@H(&ME>49R
M;VT@*2`I('L-"B`@("`@("`@("`@("`@("!A9&0N<'5T*"!K97E4;R`K(&ME
M>2YS=6)S=')I;F<H:V5Y1G)O;2YL96YG=&@H*2D@+"!V86QU92`I(#L-"@D@
M("`@?0T*"7T-"@T*"65N=6T@/2!A9&0N:V5Y<R@I(#L-"B`@("`@("`@=VAI
M;&4H(&5N=6TN:&%S36]R945L96UE;G1S*"D@*0T*("`@("`@("![#0H@("`@
M("`@("`@("!3=')I;F<@:V5Y(#T@*%-T<FEN9REE;G5M+FYE>'1%;&5M96YT
M*"D@.PT*("`@("`@("`@("`@4W1R:6YG('9A;'5E(#T@*%-T<FEN9REA9&0N
M9V5T*"!K97D@*2`[#0H-"@D@("`@=&AI<RYA9&10<F]P97)T>2@@:V5Y+"!V
M86QU92`I(#L-"@E]#0H@("`@?0T*#0H@("`@<')O=&5C=&5D('9O:60@861D
M4')O<&5R='DH4W1R:6YG(&XL(%-T<FEN9R!V*2![#0H@("`@("`@(&EF*"!U
M<V5R4')O<&5R='D@*2![#0H@("`@("`@("`@("!I9B`H<')O:F5C="YG9715
M<V5R4')O<&5R='DH;BD@/3T@;G5L;"D@>PT*("`@("`@("`@("`@("`@('!R
M;VIE8W0N<V5T57-E<E!R;W!E<G1Y*&XL('8I.PT*("`@("`@("`@("`@?2!E
M;'-E('L-"B`@("`@("`@("`@("`@("!L;V<H(D]V97)R:61E(&EG;F]R960@
M9F]R("(@*R!N+"!0<F]J96-T+DU31U]615)"3U-%*3L-"B`@("`@("`@("`@
M('T@#0H@("`@("`@('T@96QS92![#0H@("`@("`@("`@("!I9B`H<')O:F5C
M="YG9710<F]P97)T>2AN*2`]/2!N=6QL*2![#0H@("`@("`@("`@("`@("`@
M<')O:F5C="YS9710<F]P97)T>2AN+"!V*3L-"B`@("`@("`@("`@('T@96QS
M92![#0H@("`@("`@("`@("`@("`@;&]G*")/=F5R<FED92!I9VYO<F5D(&9O
M<B`B("L@;BP@4')O:F5C="Y-4T=?5D520D]312D[#0H@("`@("`@("`@("!]
;#0H@("`@("`@('T-"B`@("!]#0H-"GT-"@T*
`
end

begin 600 copyproperty.xml
M/#]X;6P@=F5R<VEO;CTB,2XP(C\^#0H-"CQP<F]J96-T(&YA;64](G!R;VIE
M8W0B(&1E9F%U;'0](FUA:6XB(&)A<V5D:7(](BXB/@T*#0H@(#QT87-K9&5F
M(&YA;64](F-O<'DM<')O<&5R=&EE<R(@8VQA<W-N86UE/2)O<F<N87!A8VAE
M+G1O;VQS+F%N="YT87-K9&5F<RYO<'1I;VYA;"Y#;W!Y4')O<&5R='DB+SX-
M"@T*("`\<')O<&5R='D@;F%M93TB86YT+G-E='1I;F<N,2(@=F%L=64](F%N
M="XQ(B\^#0H@(#QP<F]P97)T>2!N86UE/2)A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(&UE<W-A9V4](FUA:6XN-"`Z("1[
M;6%I;BYS971T:6YG+C1](B\^#0H)/&5C:&\@;65S<V%G93TB;6%I;BXU(#H@
M)'MM86EN+G-E='1I;F<N-7TB+SX-"@D\96-H;R!M97-S86=E/2)M86EN+C8@
M.B`D>VUA:6XN<V5T=&EN9RXV?2(O/@T*("`@/"]T87)G970^#0H-"CPO<')O
':F5C=#X-"@==
`
end

Mime
View raw message