ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <David.Ostrov...@dvg.de>
Subject Re: Re: conditional redeploy (only if something is changed)
Date Tue, 18 Jun 2002 07:59:03 GMT
                                                                                          
                        
                    "Steve                                                               
                         
                    Loughran"            An:     "Ant Users List" <ant-user@jakarta.apache.org>
                   
                    <steve_l@iser        Kopie:                                       
                            
                    an.com>              Thema:  Re: conditional redeploy (only if something
is changed)           
                                                                                         
                         
                    13.06.02                                                             
                         
                    20:38                                                                
                         
                    Bitte                                                                
                         
                    antworten an                                                         
                         
                    "Ant Users                                                           
                         
                    List"                                                                
                         
                                                                                         
                         
                                                                                         
                         









----- Original Message -----
From: <David.Ostrovsky@dvg.de>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, June 13, 2002 4:28 AM
Subject: conditional redeploy (only if something is changed)


>>
>> I would like to redeploy the WLS (in BEA case touch REDEPLOY) only if
two
>> condition are met:
>> 1) the compilation was sucessfull.
>> 2) at least one file was compiled.
>>
>> Simple try:
>>
>>    <target name="compile" depends="init">
>>    <javac ...>
>>    </target>
>>
>>    <target name="redeploy" depends="compile">
>>     <exec executable="touch">
>>       <arg line="${dir.application}/${app.name}/WEB-INF/REDEPLOY"/>
>>     </exec>
>>    </target>
>>
>> doesn't meet the second condition.
>>
>> I guess I should set some variable in compile target and then do
>> conditional redeploy.
>> But how can I figure out, if something was indeed compiled?
>>
>> Any hints?
>
>welcome to the world of continuous updates
>
>1. you can use <uptodate> to trigger stuff only if all the source java
>files, properties and xml stuff included in the app has changed. You see,
it
>is often more than just java source that comprises an app.
>
>2. cruise control does a check out and rebuild if the source in SCM has
>changed, but not in the last few minutes (see cruisecontrol.sf.net).
>
>-steve

Steve,

you are completly right, concerning further dependencies of redeploy.
Espesially the copy of some XML and another
files (property, but not JSP or HTML-Files).

Well, as I guess I have no choice (if I use only ant),
but to use the same trick, proposed by Diane:
Trace the copy task (I'd have to split this task to many tasks: copy of
redeploy-relevant and not redeploy-relevant files !), and then parse the
output of those tasks. In this way I'll get many properties: let say:
newClasses, newXMLDescriptionFiles, newXMLCatalogFiles etc.
then I'd user uptodate task with intern odering of those properties.

Well, that solution isn't the simplest one. Even if copy task and compile
task would set for me the properties, only if something have been done,
I must still check many dependancies. May be a specific task (Web-Server
undependent ?) that will get all this properties as input and so can decide
of the actual redeploy is needed, would be easier solution?

David Ostrovsky





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


Mime
View raw message