ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: [Ant-contrib-developers] 1.5.1 Compatible version
Date Mon, 24 Mar 2003 15:54:02 GMT
Thanks Peter for removing this debugging output.

Maybe these println statements could be replaced with log(...,
Project.MSG_VERBOSE) calls? This would help in debugging <outofdate>.

I also think the use of <path> in <copy>/<delete> is problematic (someone
posted on ant-user with a similar problem of not being able to <copy> JARs
defined in a <path>).

The solution to these problems I believe is in refactoring <filelist> to
remove this silly restriction of requiring a base dir for all files in the
filelist! --DD

-----Original Message-----
From: peter reilly [mailto:peter.reilly@corvil.com] 
Sent: Monday, March 24, 2003 4:40 AM
To: ant-contrib-developers@lists.sourceforge.net
Subject: Re: [Ant-contrib-developers] 1.5.1 Compatible version

Yikes! 
sorry about the output for each file, some debug printfs got thru.....

As regard deleteing of the targets.
With the current implemention one may do something like this.

  <target name="x">
    <outofdate alltargets="alltargets" property="notused">
      <sourcefiles>
        <fileset dir="src" includes="**/*.java"/>
      </sourcefiles>
      <mapper type="glob" from="src/*.java" to="doc/*.xml"/>
    </outofdate>

    <shellscript shell="bash">
      rm -f ${alltargets}
    </shellscript>
 </target>

The task may also output targets and sources that fullfill the
outofdate conditions either as strings or as paths.

I tried to get the task to output filesets to feel into ant tasks
like delete, and copy however
I ran into problems with filesets having only one root, this
may not be the case on windows systems, also it it not general when/if
paths take url strings.

I would propose that the delete task
should take an optional <path> sub-element.

copy may be more problematic as its rules for the <mapper/>
sub element assume file sets.

I have checked in the following changes:

1) remove spurious debug output
2) add alltargetspath
3) make all attributes optional (so there is no need
    for property="notused"

Peter

On Friday 21 March 2003 23:11, Dominique Devienne wrote:
> I'm not sure you understood me correctly...
>
> I want to force the regeneration of the target files, even though they are
> currently up-to-date (timestamp-wise).
> Putting the delete inside <outofdate <sequential>> is of no value to me in
> this case, since will never get there.
>
> Right now, as I said earlier, to force this re-generation, I have to use a
> <delete> that duplicate the target file information into another target.
>
> I do understand your point about intermediate files being generated as
well
> (and I have some too), but I don't really care about these.
>
> Actually, I believe <outofdate> should have an optional attribute to
delete
> targetfiles before running the process when something out of date, as a
> convenience (avoids having to pass a outputtargetfiles property to use
> inside sequential with a delete!!!). Could even have a third
> <intermediatefiles> Path to take care of this situation too.
>
> And BTW, using an external fileset doesn't work. The delete would work all
> right, since if the file is not there in the file-system, no need to
delete
> it, *but* on the other hand you want to no if a target file in there in
> <outodate>!!! You thus can't use a <fileset>, since the latter doesn't
know
> about files not there (and it's slower since has to scan the
directory...).
> Since delete doesn't take a path or filelist (whose syntax I hate!!!),
> one's stuck with duplicating the target file list information in two
> places... NOT GOOD!
>
> So I persist in wanting a force attribute ;-) --DD
>
> -----Original Message-----
> From: Inger, Matthew [mailto:inger@Synygy.com]
> Sent: Friday, March 21, 2003 4:59 PM
> To: 'Dominique Devienne'; 'peter reilly'
> Cc: 'ant-contrib-developers@lists.sourceforge.net'
> Subject: RE: [Ant-contrib-developers] 1.5.1 Compatible version
>
> This is probably more appropriate:
> <outofdate .... >
>  <sequential>
>    <!-- do your clean here -->
>  </sequential>
> </outofdate>
> The problem is that we don't necessarily want to assume
> what needs to be done in order to clean up your targets.
> A lot of times, there are intermediate files (such as when
> transforming IDL into Java, or some other code generators).
> So deleting the target files is not necessarily an option.
> I'd rather see people clean their own files, so it's done
> correctly according to their application.
> And you don't need to duplicate the target files, if you are
> defining your filesets with id's outside of the outofdate task.
>
> <fileset id="abc" ...>
>   ...
> </fileset>
> <outofdate ...>
>   <targetfiles>
>      <fileset refid="abc" />
>   </targetfiles>
>   ...
>   <sequential>
>      <delete>
>        <fileset refid="abc" />
>      </delete>
>   </sequential>
> </outofdate>
>
> ----------------
> Matthew Inger [inger@synygy.com]
> Software Developer
> Synygy, Inc
> 610-664-7433 x 7770
> "Self Respect - The secure feeling that no one, as yet,
>  is suspicious" - HL Mencken
>
> -----Original Message-----
> From: Dominique Devienne [mailto:DDevienne@lgc.com
> <mailto:DDevienne@lgc.com> ]
> Sent: Friday, March 21, 2003 5:19 PM
> To: Dominique Devienne; 'peter reilly'
> Cc: 'ant-contrib-developers@lists.sourceforge.net'
> Subject: RE: [Ant-contrib-developers] 1.5.1 Compatible version
>
> Sorry, meant to send my previous post to the list (I'm so used to posting
> to
>
> Jakarta lists ;-)
> Another feature I'd like <outofdate> to have is a 'force' attribute that
> deletes all targetfiles, and runs the <sequential>/<parallel> block. I
keep
> having to write custom 'clean' targets that duplicate the target files to
> feed to <delete>...
> And I might even do it myself if no one does it in the next year or so ;-)
> Thanks for <outofdate>!!! I love it. --DD
> -----Original Message-----
> From: Dominique Devienne
> Sent: Friday, March 21, 2003 2:06 PM
> To: 'peter reilly'
> Subject: RE: [Ant-contrib-developers] 1.5.1 Compatible version
> Peter,
> <outofdate> works great for me, but seems to systematically outputs the
> source files it checks apparently, whether they're out of date or not. I
> like my targets to be silent when they don't do anything, and Just to get
> the tasks output themselves (within the nested <sequential>/<parallel>)...
> Most Ant task behave that way, and some have an additional extra attribute
> for more verbose output (without resorting to -verbose). Would it be
> possible to have this incorporated? Thanks, --DD
> -----Original Message-----
> From: peter reilly [mailto:peter.reilly@corvil.com
> <mailto:peter.reilly@corvil.com> ]
> Sent: Friday, March 21, 2003 12:38 PM
> To: ant-contrib-developers@lists.sourceforge.net
> Subject: Re: [Ant-contrib-developers] 1.5.1 Compatible version
> It is (seems to be) compatible with Ant 1.5.2.
> Peter
>
> On Friday 21 March 2003 17:42, Dominique Devienne wrote:
> > I see ant-contrib's HEAD is not compatible with Ant 1.5.1...
> >
> > Any chance of creating a branch that would be 1.5.x compatible?
> > If not, what would be the date to use in the update to get back
> > to a 1.5.x compatible code base? I just wanted to get <outofdate> :(
> >
> > Thanks, --DD
> >
> > P:\net_sf\ant-contrib>C:\pro\ant1.5.1\bin\ant jar
> > Buildfile: build.xml
> >
> > build_dirs:
> >
> > build_contrib_jar:
> >     [javac] Compiling 8 source files to P:\net_sf\ant-contrib\classes
> >     [javac]
> > P:\net_sf\ant-contrib\src\net\sf\antcontrib\logic\ForEach.java:312:
> > handleOutput(java.la
> > ng.String) has protected access in
>
> org.apache.tools.ant.taskdefs.CallTarget
>
> >     [javac]                 currentTarget.handleOutput(line);
> >     [javac]                              ^
> >     [javac]
> > P:\net_sf\ant-contrib\src\net\sf\antcontrib\logic\ForEach.java:326:
> > handleErrorOutput(ja
> > va.lang.String) has protected access in
> > org.apache.tools.ant.taskdefs.CallTarget
> >     [javac]                 currentTarget.handleErrorOutput(line);
> >     [javac]                              ^
> >     [javac] 2 errors
> >
> > BUILD FAILED
> > file:P:/net_sf/ant-contrib/build.xml:133: Compile failed; see the
> > compiler
> >
> > error output for details.
> >
> >
> > Total time: 3 seconds
> > P:\net_sf\ant-contrib>
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by:Crypto Challenge is now open!
> > Get cracking and register here for some mind boggling fun and
> > the chance of winning an Apple iPod:
> > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
>
> <http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en>
>
> > _______________________________________________
> > Ant-contrib-developers mailing list
> > Ant-contrib-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers
>
> <https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open!
> Get cracking and register here for some mind boggling fun and
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> <http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en>
> _______________________________________________
> Ant-contrib-developers mailing list
> Ant-contrib-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers
> <https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open!
> Get cracking and register here for some mind boggling fun and
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> <http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en>
> _______________________________________________
> Ant-contrib-developers mailing list
> Ant-contrib-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers
> <https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Ant-contrib-developers mailing list
Ant-contrib-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers

Mime
View raw message