ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lev Serebryakov <>
Subject Re: How to write <uptodate> for <javah> task (i.e. check several headers files by class files or java files)?
Date Mon, 06 May 2013 07:44:22 GMT
Hello, Ant.
You wrote 4 мая 2013 г., 12:08:41:

LS>   (2)
LS>     Then I tried to construct list of headers on-the-fly with <mapper>
LS>   inside <uptodate>. And failed completely, as I could use
LS>   <packagemapper> to convert from path to dotted-delimetered name of
LS>   file, but after that I could not convert dots to underscores, as
LS>   <regexpmapper> require FULL name in "to" attribute, not only
LS>   replacement. And, yes, what should I do if my paths contains dots!?
LS>   It will break everything!
 Ok, this construction works:

<loadresource property="java.sources.with.native">
  <propertyresource name="classes.native" />
      <stringtokenizer delims=","/>
      <replacestring from="." to="/"/>
      <replaceregex pattern="$$" replace=".java" />
<uptodate property="javah.skip">
  <srcfiles dir="${path.src}/src" includes="${java.sources.with.native}" />
    <packagemapper from="*.java" to="${path.native}/*" />
      <replacestring from="." to="_" />
      <suffixlines suffix=".h" />

// Black Lion AKA Lev Serebryakov <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message