On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

>Author: xavier
>Date: Mon Jul  9 07:32:31 2007
>New Revision: 554661
>
>URL: http://svn.apache.org/viewvc?view=rev&rev=554661
>Log:
>- NEW: Add cleancache task (IVY-565)
>- FIX: Ant target "clean" on Ivy multi-project tutorial points to wrong
cache directory. (IVY-548)


While there is a good commit comment I think it would be better to have
two separate commits in
case you want to revert one... But just my 2ct.


Yes, I usually try to separate in several commits. But in this case it would
have been a bit awkward IMO. Indeed I've updated all tutorials to make use
of the cleancache task, and as a side effect it fixed IVY-548. So committing
all tutorials but the multi-project with IVY-565, and only the multi-project
with IVY-548 because there's an issue only for this one would have been
strange IMHO.

incubator/ivy/core/trunk/src/example/multi-project/build.xml (original)
>       <!-- here is the version of ivy we will use. change this
property to try a newer
>          version if you want -->
>-      <property name="ivy.jar.dir" value="${user.home}/.ivy/jars" />
>+      <property name="ivy.jar.dir" value="${user.home}/.ivy2/jars" />


Do you want to change "globally" to ~/.ivy2?


I think it's the idea, keeping some things in ~/.ivy and others in ~/.ivy2
doesn't make much sense, does it?

Added:
>incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyCleanCache.java

>+ *  Using the delete task gives more control over what is actually
deleted (you can use include
>+ *  and exclude filters), but requires a settings to be loaded before,
while this task
>+ *  ensures the settings is loaded.


We could also delegate include/exclude pattern ...


Indeed, it would make the cleancache task more flexible. This will go in a
future release, I've already spent to much time (according to my planning)
on this, and I need to make a release.

+ */
>+public class IvyCleanCache extends IvyTask {
>+
>+    public void doExecute() throws BuildException {
>+        Delete delete = new Delete();


You should invoke >>  delete.bindToOwner(this);  << (on Ant 1.7)


Is this only in Ant 1.7? Since we are compatible with Ant 1.6 (and even
supposed to be compatible with Ant 1.5.2), I guess we should better add this
code in a AntHelper. But thanks a lot for pointing this out, it's much
better than what I used to do.

Xavier

   public final void bindToOwner(Task owner) {
        setProject(owner.getProject());
        setOwningTarget(owner.getOwningTarget());
        setTaskName(owner.getTaskName());
        setDescription(owner.getDescription());
        setLocation(owner.getLocation());
        setTaskType(owner.getTaskType());
    }




Jan




--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/

Reply via email to