You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Da...@dvg.de on 2002/06/13 13:28:08 UTC

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?

David Ostrovsky


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: conditional redeploy (only if something is changed)

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: <Da...@dvg.de>
To: <an...@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


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: conditional redeploy (only if something is changed)

Posted by Diane Holt <ho...@yahoo.com>.
--- David.Ostrovsky@dvg.de wrote:
> 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.

If you're running Ant1.5, see:
  http://marc.theaimsgroup.com/?l=ant-user&m=102270726717601&w=2
for an approach I posted for someone with a similar need.

Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>