You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "alu, artifex" <ap...@artifex.co.at> on 2004/04/27 14:16:45 UTC
uptodate task question
i'm trying to use ant to generate xdoclet mappings for struts only if
either
- a source file changed
- one of the xml-fragment files which are merged into struts-config.xml
changed
i used the following uptodate entry:
<uptodate property="xDoclet.struts.isUpToDate">
<srcfiles dir=".">
<include name="${xdoclet.mergefiles}/struts/**/*.xml"/>
<include
name="${dir.src}/at/artifex/xtend/mvc/**/*.java"/>
</srcfiles>
<mapper type="merge" to="${dir.webapp}/WEB-INF/struts-config.xml"/>
</uptodate>
it seems like ant only checks for changes in the xml-files, if a java
file changes the property is
always set to "true". i also tried the attribute
<uptodate ... targetfile="${dir.webapp}/WEB-INF/struts-config.xml">
instead of the mapper "merge" but with no effect.
any help would be appreciated.
regards
alu
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: uptodate task question [solved]
Posted by "alu, artifex" <ap...@artifex.co.at>.
i wasn't aware that it is possible to use 2 srcfiles elements,
it works fine now - thanks a lot!
anyway, shouldn't the other version:
<srcfiles dir=".">
<include ...>
<include ...>
</srcfiles>
work too? (${dir.src} is a relative path)
regards,
alu
Peter Reilly wrote:
> Please echo "${dir.src}", if it is an absolute path
> the <include name="${dir.src}...."/> will not find it.
>
> You should use two <srcfiles/> nested elements:
>
> <uptodate property="xDoclet.struts.isUpToDate">
> <srcfiles dir="${xdoclet.mergefiles}"
> includes="struts/**/*.xml"/>
> <srcfiles dir="${dir.src}"
> includes="at/artifex/xtend/mvc/**/*.java"/>
> <mapper type="merge" to="${dir.webapp}/WEB-INF/struts-config.xml"/>
> </uptodate>
>
> Peter
>
> ---------------------------------------------------------------------
> 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
Re: uptodate task question
Posted by Peter Reilly <pe...@corvil.com>.
Please echo "${dir.src}", if it is an absolute path
the <include name="${dir.src}...."/> will not find it.
You should use two <srcfiles/> nested elements:
<uptodate property="xDoclet.struts.isUpToDate">
<srcfiles dir="${xdoclet.mergefiles}"
includes="struts/**/*.xml"/>
<srcfiles dir="${dir.src}"
includes="at/artifex/xtend/mvc/**/*.java"/>
<mapper type="merge" to="${dir.webapp}/WEB-INF/struts-config.xml"/>
</uptodate>
Peter
alu, artifex wrote:
> i'm trying to use ant to generate xdoclet mappings for struts only if
> either
> - a source file changed
> - one of the xml-fragment files which are merged into
> struts-config.xml changed
>
> i used the following uptodate entry:
>
> <uptodate property="xDoclet.struts.isUpToDate">
> <srcfiles dir=".">
> <include name="${xdoclet.mergefiles}/struts/**/*.xml"/>
> <include
> name="${dir.src}/at/artifex/xtend/mvc/**/*.java"/>
> </srcfiles>
> <mapper type="merge" to="${dir.webapp}/WEB-INF/struts-config.xml"/>
> </uptodate>
>
> it seems like ant only checks for changes in the xml-files, if a java
> file changes the property is
> always set to "true". i also tried the attribute
>
> <uptodate ... targetfile="${dir.webapp}/WEB-INF/struts-config.xml">
>
> instead of the mapper "merge" but with no effect.
>
> any help would be appreciated.
>
> regards
> alu
>
> ---------------------------------------------------------------------
> 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