Thanks for the suggestion. I'll investigate ant-contrib.
JDG On 5/16/07, Matt Benson <[EMAIL PROTECTED]> wrote:
--- Jay Dickon Glanville <[EMAIL PROTECTED]> wrote: > A little more information ... > > I have a single XML Schema document (the source > file). I'm using > Castor on this schema to generate a set of java > files. (There are > multiple java files created - at least one for each > element in the > schema. This number is not known at castor-gen > time. These java > files will marshal and unmarshal information from > xml files that > comply with the above schema doc.) The java files > are segregated into > an isolated directory. > > Then the procedure finishes with the standard > compile routine. They > are not jared into a single distributable. > > So the procedure is: single xml schema to multiple > java files to > multiple class files. > > I don't want to run Castor or javac if any of the > java files are older > then the XML schema document. > > So, with <uptodate>, I have a situation where I have > a single source > file (the XML schema document) with multiple target > files (the > multiple java files). If the relationship were > reversed (many source > to one target), I wouldn't have a problem as the > documentation is very > helpful. However, having a one to many relationship > is proving a > little difficult. > > Does this background information help? It does. From the above I distill the takeaway message that a mapper won't help you get from your source to your target files, BUT that you can easily specify a fileset of your target files. My recommendation is to use ant-contrib's outofdate task. -Matt > > Thanks > > JDG > > On 5/16/07, Matt Benson <[EMAIL PROTECTED]> > wrote: > > Jay, <uptodate> should be able to handle what you > want > > to do, but we need a little more information > regarding > > the derivation of your target files. In any event > > you'll probably end up using a composite mapper > (if > > you're using the <mapper> element it should > magically > > behave as a composite mapper simply by nesting > > multiple child mappers within it). > > > > HTH, > > Matt > > > > --- Jay Dickon Glanville > <[EMAIL PROTECTED]> > > wrote: > > > > > Any suggestions? > > > > > > Thanks > > > > > > On 5/14/07, Jay Dickon Glanville > > > <[EMAIL PROTECTED]> wrote: > > > > Hello again, > > > > > > > > I have a situation where many java files are > being > > > created from a > > > > single xml file. I don't want this to be done > if > > > the java files are > > > > up to date. > > > > > > > > Therefore, I'm trying to use the <uptodate> > task > > > to generate a > > > > property only if java file creation is > necessary. > > > The problem I'm > > > > having is that all the examples of the > <uptodate> > > > task and it's > > > > <mapper> subtasks deal with the output being a > > > single file. > > > > > > > > How do I write a <mapper> to where the target > is > > > multiple files? > > > > > > > > For example > > > > > > > > <uptodate property="dont.gen.java" > > > > srcfile="my-xml-file.xml"> > > > > <mapper type="merge" > > > > to="a-whole-wack-of-java-files" /> > > > > </uptodate> > > > > > > > > So, what type of mapper do I need to map a > single > > > source file to > > > > multiple target files? > > > > > > > > -- > > > > Jay Dickon Glanville > > > > > > > > > > > > > -- > > > Jay Dickon Glanville > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > Moody friends. Drama queens. Your life? Nope! - > their life, your story. Play Sims Stories at Yahoo! > Games. > > http://sims.yahoo.com/ > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > Jay Dickon Glanville > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Jay Dickon Glanville --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]