ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ba...@goodconsultants.com
Subject Re: ant -k and -D flags together will not work?
Date Wed, 28 Jan 2004 17:32:01 GMT
Alexey, and all,
 
I feel that I am still not finding the right answers here. 
 
Alexey, you are referring to the duplication of tasks within build.xml in 
parent and child levels.
 
However, 
 
1. I am referring to parent directory build.xml calling child build.xml. What 
is the correct way to do it?
 
2. If first child fail, then why the second one cannot continue? Even using "-
k"? 
 
Please advice.
 
Thanks
 
Barry
----- Original Message ----- 
From: Alexey N. Solofnenko 
To: barry@goodconsultants.com 
Sent: Friday, January 23, 2004 10:06 AM
Subject: Re: ant -k and -D flags together will not work?


No, the directory structure can be anything. The problem with any build tool 
(including make and ant) is recursive builds. The tools work well only when 
there is a single build script (they work okay with multiple build files, but 
not very well). With recursive builds it is very difficult to track or 
describe intercomponent dependencies and -k option relies on them. With my 
build I am using a preprocessor that generates a single build file out of 
several component build files. Now in ANT there is an <import> task that 
allows importing several build files into a single one. I did not use 
<import>, but people reported that it is working well (the only problem is the 
base directory - it will be your main build.xml base directory). Please try 
using <import> instead of <ant>.

- Alexey.

barry@goodconsultants.com wrote:

Alexey,

Would you mind email me directly? I would like to get the issue resolved if 
possible.

Are you saying that the structure that i described is wrong?

Thanks

B.
barry@goodconsultants.com

----- Original Message ----- 
From: "Alexey N. Solofnenko" <A.Solofnenko@mdl.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Friday, January 23, 2004 9:45 AM
Subject: Re: ant -k and -D flags together will not work?


  
Many "nice" features work only when you have a single build file. 
<import> might be better than <ant>.

- Alexey.

barry@goodconsultants.com wrote:

    
All,

Alexey, correct, however, I would like to resolve the first issue first. Am
i structuring the source tree and ant files correctly? Meaning, calling two
subdirectories by using <ant dir=""/>, is it the right way to do it? Is this
structure affecting me and thats why i cannot use "ant -k" to continue the
whole build after server_a fails the compilation?

Please enlight me.

B.

----- Original Message ----- 
Wrom: WCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOY
To: "Ant Users List" <user@ant.apache.org>
Sent: Friday, January 23, 2004 8:24 AM
Subject: Re: ant -k and -D flags together will not work?


 

      
You just said that server_b depends on server_a. If server_a build fails
then server_b cannot be built. It is possible to divide server_a build
into separate stages and make server_b depend only on a part of server_a
build that does not fail.

- Alexey.

Baz wrote:

   

        
Stefan and all,

Yes i do have a serious issue with that...  My case is like the
     

          
followings:
 

      
/top_level_dir/build.xml
              /server_a/build.xml
              /server_b/build.xml

build.xml from toplevel directory calling level_a/build.xml by doing <ant
dir="server_a" Inhertitall="false" Target="all"/>

build.xml from toplevel directory calling level_b/build.xml by doing <ant
dir="server_b" Inhertitall="false" Target="all"/>

where server_b depends on server_a, and both server_a and server_b have
their own build.xml so that developers can go into server_b directory and
just build server_b.

Issue #1) When server_a failed in the javac task, and by default,
failonerror="true", the whole build from /top_level_dir/build.xml just
stopped. server_b does not get compile. True, server_b will fail even if
     

          
it
 

      
is going to be compile.

Issue #2) However, the correct behaviour should be server_a failed in
     

          
javac
 

      
compilation, then start compiling server_b and server_b fails too. This
     

          
can
 

      
be done if I set the failonerror="false" in javac task of server_a.
     

          
However,
 

      
then the build will return SUCCESSFUL which is a wrong behaviour.

Thanks and please comment.

B.

----- Original Message ----- 
Wrom: IYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKE
To: <user@ant.apache.org>
Sent: Thursday, January 22, 2004 11:19 PM
Subject: Re: ant -k and -D flags together will not work?




     

          
On Thu, 22 Jan 2004, Baz <barry@goodconsultants.com> wrote:



       

            
Cannot execute 'javadoc' - 'compile' failed or was not executed.
Cannot execute 'dist' - 'compile' failed or was not executed.
Cannot execute 'all' - 'javadoc' failed or was not executed.


         

              
Maybe we should -k better, then.

If a target fails, all targets that depend on that target are going to
be skipped.  If you use -k it means that any other targets that are
also part of the build process but do not depend on the failing target
will be executed.

What would you expect a dist target to do if compilation failed?

Stefan

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




       

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


     

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


   

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

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


    


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



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


Mime
View raw message