ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject [Proposal] New checkProperties task - "CheckPropertyItem.java" 3709 Bytes
Date Tue, 26 Nov 2002 17:20:40 GMT
Hi,

In the Cactus project, we have been using a custom Ant task to check that
our different builds had the correct Ant properties set up. We called that
task checkProperties. It's a bit a overhead of us, as it has nothing to do
with Cactus (it is completely generic) and makes our build process more
complex than it should be (two phase process, one phase to build the custom
ant task and another to run the other builds).

Thus, we would like to donate it to the Ant project, as an optional task.

I haven't been following too closely the new tasks in the latest versions of
Ant and it is possible there is a better way of doing this now.

Here's its usage:

        <checkProperty>
            <property name="cvs.executable"/>
            <property name="j2ee.jar" isfile="true"/>
            <property name="commons.logging.jar" isfile="true"/>
            <property name="commons.httpclient.jar" isfile="true"/>
            <property name="httpunit.jar" isfile="true"/>
        </checkProperty>

When a file is not present, the error displayed is:

"The file [c:/apps/maven/repository/j2ee/jars/j2ee-1.3.jarx] pointed by
[j2ee.jar] does not exist"

For a property which is not a file or an undefined property, the error
displayed is:

"The property [cvs.executable] is not defined"

Hope you like it.

Thanks
-Vincent


begin 644 CheckPropertyItem.java
M+RH-"B`J(#T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]#0H@*@T*("H@5&AE($%P
M86-H92!3;V9T=V%R92!,:6-E;G-E+"!697)S:6]N(#$N,0T*("H-"B`J($-O
M<'ER:6=H="`H8RD@,C`P,2TR,#`R(%1H92!!<&%C:&4@4V]F='=A<F4@1F]U
M;F1A=&EO;BX@($%L;"!R:6=H=',-"B`J(')E<V5R=F5D+@T*("H-"B`J(%)E
M9&ES=')I8G5T:6]N(&%N9"!U<V4@:6X@<V]U<F-E(&%N9"!B:6YA<GD@9F]R
M;7,L('=I=&@@;W(@=VET:&]U=`T*("H@;6]D:69I8V%T:6]N+"!A<F4@<&5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)T>2!A8VMN
M;W=L96=E;65N=',@;F]R;6%L;'D@87!P96%R+@T*("H-"B`J(#0N(%1H92!N
M86UE<R`B5&AE($IA:V%R=&$@4')O:F5C="(L(")#86-T=7,B(&%N9"`B07!A
M8VAE(%-O9G1W87)E#0H@*B`@("!&;W5N9&%T:6]N(B!M=7-T(&YO="!B92!U
M<V5D('1O(&5N9&]R<V4@;W(@<')O;6]T92!P<F]D=6-T<PT*("H@("`@9&5R
M:79E9"!F<F]M('1H:7,@<V]F='=A<F4@=VET:&]U="!P<FEO<B!W<FET=&5N
M('!E<FUI<W-I;VXN($9O<@T*("H@("`@=W)I='1E;B!P97)M:7-S:6]N+"!P
M;&5A<V4@8V]N=&%C="!A<&%C:&5`87!A8VAE+F]R9RX-"B`J#0H@*B`U+B!0
M<F]D=6-T<R!D97)I=F5D(&9R;VT@=&AI<R!S;V9T=V%R92!M87D@;F]T(&)E
M(&-A;&QE9"`B07!A8VAE(@T*("H@("`@;F]R(&UA>2`B07!A8VAE(B!A<'!E
M87(@:6X@=&AE:7(@;F%M97,@=VET:&]U="!P<FEO<B!W<FET=&5N#0H@*B`@
M("!P97)M:7-S:6]N(&]F('1H92!!<&%C:&4@1W)O=7`N#0H@*@T*("H@5$A)
M4R!33T945T%212!)4R!04D]6241%1"!@8$%3($E3)R<@04Y$($%.62!%6%!2
M15-3140@3U(@24U03$E%1`T*("H@5T%24D%.5$E%4RP@24Y#3%5$24Y'+"!"
M550@3D]4($Q)34E4140@5$\L(%1(12!)35!,245$(%=!4E)!3E1)15,-"B`J
M($]&($U%4D-(04Y404))3$E462!!3D0@1DE43D534R!&3U(@02!005)424-5
M3$%2(%!54E!/4T4@05)%#0H@*B!$25-#3$%)345$+B`@24X@3D\@159%3E0@
M4TA!3$P@5$A%($%004-(12!33T945T%212!&3U5.1$%424].($]2#0H@*B!)
M5%,@0T].5%))0E543U)3($)%($Q)04),12!&3U(@04Y9($1)4D5#5"P@24Y$
M25)%0U0L($E.0TE$14Y404PL#0H@*B!34$5#24%,+"!%6$5-4$Q!4EDL($]2
M($-/3E-%455%3E1)04P@1$%-04=%4R`H24Y#3%5$24Y'+"!"550@3D]4#0H@
M*B!,24U)5$5$(%1/+"!04D]#55)%345.5"!/1B!354)35$E4551%($=/3T13
M($]2(%-%4E9)0T53.R!,3U-3($]&#0H@*B!54T4L($1!5$$L($]2(%!23T9)
M5%,[($]2($)54TE.15-3($E.5$524E505$E/3BD@2$]7159%4B!#0553140@
M04Y$#0H@*B!/3B!!3ED@5$A%3U)9($]&($Q)04))3$E462P@5TA%5$A%4B!)
M3B!#3TY44D%#5"P@4U1224-4($Q)04))3$E462P-"B`J($]2(%1/4E0@*$E.
M0TQ51$E.1R!.14=,24=%3D-%($]2($]42$525TE312D@05))4TE.1R!)3B!!
M3ED@5T%9($]55`T*("H@3T8@5$A%(%5312!/1B!42$E3(%-/1E1705)%+"!%
M5D5.($E&($%$5DE3140@3T8@5$A%(%!/4U-)0DE,2519($]&#0H@*B!354-(
M($1!34%'12X-"B`J(#T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]#0H@*@T*("H@
M5&AI<R!S;V9T=V%R92!C;VYS:7-T<R!O9B!V;VQU;G1A<GD@8V]N=')I8G5T
M:6]N<R!M861E(&)Y(&UA;GD-"B`J(&EN9&EV:61U86QS(&]N(&)E:&%L9B!O
M9B!T:&4@07!A8VAE(%-O9G1W87)E($9O=6YD871I;VXN("!&;W(@;6]R90T*
M("H@:6YF;W)M871I;VX@;VX@=&AE($%P86-H92!3;V9T=V%R92!&;W5N9&%T
M:6]N+"!P;&5A<V4@<V5E#0H@*B`\:'1T<#HO+W=W=RYA<&%C:&4N;W)G+SXN
M#0H@*@T*("HO#0IP86-K86=E(&]R9RYA<&%C:&4N8V%C='5S+F%N=#L-"@T*
M+RHJ#0H@*B!$871A(&]B:F5C="!F;W(@:&]L9&EN9R!A(%!R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-H#0H@("`@("H@("`@("`@
M("!T;R!C:&5C:R!I=',@97AI<W1E;F-E+@T*("`@("`J+PT*("`@('!U8FQI
M8R!B;V]L96%N(&ES1FEL92@I#0H@("`@>PT*("`@("`@("!R971U<FX@=&AI
3<RYI<T9I;&4[#0H@("`@?0T*?69A
`
end

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message