You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dimitris Mouchritsas <di...@eurodyn.com> on 2008/02/21 11:49:41 UTC

Trying to intersect resources(?)

Hi all,
I'm trying to write an uptodate target for an xdoclet target to depend 
upon, so xdoclet doesn't get called every time.
The objects I'm trying to check for have hibernate mapping files. The 
problem is, not all of them have corresponding
mapping files. So for example the following target:

    <target name="domain-generated-sources">
        <uptodate property="domain.doclet.not.needed">
            <srcfiles dir="${src.dir}">       
                <include name="**/domain/**/*.java"/>
                <include name="**/web/bean/*.java"/>
                <include name="**/hibernate/type/**/*.java"/>
            </srcfiles>
            <chainedmapper>
                <globmapper from="*" to="${domain.build.dir}/" />
                <globmapper from="*.java" to="*.hbm.xml" />
            </chainedmapper>
        </uptodate>

        <echo>${domain.doclet.not.needed}</echo>
    </target>

doesn't work, because there are java files that don't have the 
corresponding .hbm.xml file.
Is there a way I could say in srcfiles: "Include all the files that I'm 
telling you (using <include name...)
but who also have a corresponding *.hbm.xml file in the 
${domain.build.dir}?" I tried to take a look at
intersect but there are zero examples I could find. Thanks.


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


Re: Trying to intersect resources(?)

Posted by Dimitris Mouchritsas <di...@eurodyn.com>.
Dimitris Mouchritsas wrote:
> Hi all,
> I'm trying to write an uptodate target for an xdoclet target to depend 
> upon, so xdoclet doesn't get called every time.
> The objects I'm trying to check for have hibernate mapping files. The 
> problem is, not all of them have corresponding
> mapping files. So for example the following target:
>
>    <target name="domain-generated-sources">
>        <uptodate property="domain.doclet.not.needed">
>            <srcfiles dir="${src.dir}">                      <include 
> name="**/domain/**/*.java"/>
>                <include name="**/web/bean/*.java"/>
>                <include name="**/hibernate/type/**/*.java"/>
>            </srcfiles>
>            <chainedmapper>
>                <globmapper from="*" to="${domain.build.dir}/" />
>                <globmapper from="*.java" to="*.hbm.xml" />
>            </chainedmapper>
>        </uptodate>
>
>        <echo>${domain.doclet.not.needed}</echo>
>    </target>
>
> doesn't work, because there are java files that don't have the 
> corresponding .hbm.xml file.
> Is there a way I could say in srcfiles: "Include all the files that 
> I'm telling you (using <include name...)
> but who also have a corresponding *.hbm.xml file in the 
> ${domain.build.dir}?" I tried to take a look at
> intersect but there are zero examples I could find. Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
Nevermind, I check them all against hibernate.cfg.xml with merge mapper.

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