You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Steve Benigan (JIRA)" <ji...@apache.org> on 2008/09/05 23:16:44 UTC

[jira] Updated: (IVY-889) Trigger only fires for the first dependency when the event is post-download-artifact

     [ https://issues.apache.org/jira/browse/IVY-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Benigan updated IVY-889:
------------------------------

    Environment: OSX Leopard, Windows XP, JSE 1.5 and JSE 1.6, Ant 1.7.1  (was: OSX Leopard, JSE 1.5 and JSE 1.6, Ant 1.7.1)

Verified that this occurs under Windows XP, JSE 6, Ant 1.7.1, ivy 2.0.0 beta 2.
Also debugged to see what was going on.  Someone who's closer to the code should take a look but here's what I found:

The EndArtifactDownloadEvent is getting triggered for each file downloaded so there's something wrong with the listener or listener logic:

Maybe one of the following is the cause:

1. the loop in EventManager.java:61 incorrect?
2. the trigger listener is being removed from the EventManager.listeners after the first IvyEvent is fired?
3. state changes on the trigger listener and causes it to ignore subsequent events?

> Trigger only fires for the first dependency when the event is post-download-artifact
> ------------------------------------------------------------------------------------
>
>                 Key: IVY-889
>                 URL: https://issues.apache.org/jira/browse/IVY-889
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-2
>         Environment: OSX Leopard, Windows XP, JSE 1.5 and JSE 1.6, Ant 1.7.1
>            Reporter: Steve Benigan
>
> With an empty default cache directory I would expect the post-download-artifact to event to trigger for each artifact but it is only triggering for the first dependency listed in ivy.xml
> ivy.xml:
> ...
>         <dependency org="commons-lang" name="commons-lang" rev="1.0" conf="" />
>         <dependency org="commons-cli"  name="commons-cli"  rev="1.0"/>
> ...
> ivysettings.xml:
> ... 
>    <triggers>
>         <ant-build
>             antfile="${ivy.settings.dir}/build.xml"
>             target="test"
>             prefix="dep"
>             event="post-download-artifact"
>             filter="status=successful"/>
>     </triggers>
> ...
> build.xml
> ...
>     <target name="build">
>         <ivy:resolve/>
>     </target>
> ...
>     <target name="test">
>         <echo message="***** ${dep.organisation} ${dep.revision} ${dep.artifact} ${dep.ext}"/> 
>     </target>
> Executing the build, only commons-lang artifact download (or whichever dependency is resolved first) results in a call to the test target.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.