FAQ
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

Search Discussions

  • Dimitris Mouchritsas at Feb 21, 2008 at 12:50 pm

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesant
postedFeb 21, '08 at 10:50a
activeFeb 21, '08 at 12:50p
posts2
users1
websiteant.apache.org

1 user in discussion

Dimitris Mouchritsas: 2 posts

People

Translate

site design / logo © 2018 Grokbase