ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <j_a_fernan...@yahoo.com>
Subject Re: Order of attributes versus elements
Date Sun, 03 Mar 2002 13:11:11 GMT
From: "Conor MacNeill" <conor@cortexebusiness.com.au>

> Peter Donald wrote:
> 
> > 
> > 
> > They are included by <src/> element?
> 
> 
> No. They are not included by Ant at all. Only the compiler includes them
> 
> The compile list is generated by the application of include and exclude 
> patterns over the source paths (the srcDir and <src> elements). The 
> following <exclude> elements
>    <exclude 
> name="org/apache/avalon/excalibur/datasource/AbstractJdbcConnection.java"/>
>    <exclude 
> name="org/apache/avalon/excalibur/datasource/JdbcConnection.java"/>
> mean these classes are not in the compile list. The classes are compiled 
> because other classes in the compile list depend on them, which causes 
> the compiler to search the source path. It is at this point that the 
> order of elements in the source path becomes important. The fact that 
> two copies of the Java file exist in the available source paths means 
> you need to rely on the order.
> 
> It is this reliance on ordering that is a hack, but you don't seem to agree.
> 

I think the real issue here is the combined use of srcDir and <src/>. That is a hack.
However, if you were to write:

    <javac ....>
        <src ...>
            <include ..../>
        </src>
        <src ...>
            <include .../>
            <exclude .../>
        </src>
    </javac>

This construction is fine, there is no hack here, IMHO. So the real issue and where I think
the real bug is, is the meaning of the "srcdir" attribute. Its meaning should not be depend
on
order (since attributes are not ordered). 

Either we must say that "srcdir" and <src/> cannot be mixed, or we should say that "srcdir"
denotes the FIRST element of the source-path. That would give a clear definition independent
of
the order of evaluation. 

Jose Alberto



--
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