You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Timothy Aston <Ti...@ca.ibm.com> on 2010/04/07 22:29:23 UTC

IvyDE and triggers?


We have some legacy dependencies in our project that are .tar.gz files, and
in some of these .tar.gz files are .jar files that I would like to include
in the class path.  Of course from the ANT side of things, this is simple,
but not so much from the Eclipse side.  I tried a quick test with a trigger
and IvyDE did not seem to call it.  Has anyone been able to get this sort
of thing working?


-Tim

Re: Re: IvyDE and triggers?

Posted by da...@a-sis.com.
Created IVYDE-244

Damien


-----Maarten Coene <ma...@yahoo.com> a écrit : -----

A : ivy-user@ant.apache.org
De : Maarten Coene <ma...@yahoo.com>
Date : 04/20/2010 11:41PM
Objet : Re: Re: IvyDE and triggers?

Seems like you have found a bug in IvyDE.
Could you open a JIRA ticket?

thanks
Maarten


----- Original Message ----
From: "damien.chambe@a-sis.com" <da...@a-sis.com>
To: ivy-user@ant.apache.org
Sent: Thu, April 8, 2010 4:13:59 PM
Subject: RE:Re: IvyDE and triggers?


Hello,

You post gived me an idea for a build problem, and I tried to run triggers
in ivyDE too. <ant-build> or <ant-call> doesn't work for me. Do you use
ivyDE 2.1 ?

I don't know how triggers could work in ivyDE 2.1 because they are not
converted as Ivy listeners:
postconfigure() method from Ivy is never called when getting the ivy
instance.
I tried to add  ivy.configureDefault();   after each Ivy.newInstance
(ivySettings);  in IvyClassPathContainerState.
It works, my post-resolve trigger is called.
I don't know if it's the right method, settings are loaded several times
with this modification.
I will do more tests witht this setup.

Damien Chambe




Re: Re: IvyDE and triggers?

Posted by Maarten Coene <ma...@yahoo.com>.
Seems like you have found a bug in IvyDE.
Could you open a JIRA ticket?

thanks
Maarten


----- Original Message ----
From: "damien.chambe@a-sis.com" <da...@a-sis.com>
To: ivy-user@ant.apache.org
Sent: Thu, April 8, 2010 4:13:59 PM
Subject: RE:Re: IvyDE and triggers?


Hello,

You post gived me an idea for a build problem, and I tried to run triggers
in ivyDE too. <ant-build> or <ant-call> doesn't work for me. Do you use
ivyDE 2.1 ?

I don't know how triggers could work in ivyDE 2.1 because they are not
converted as Ivy listeners:
postconfigure() method from Ivy is never called when getting the ivy
instance.
I tried to add  ivy.configureDefault();   after each Ivy.newInstance
(ivySettings);  in IvyClassPathContainerState.
It works, my post-resolve trigger is called.
I don't know if it's the right method, settings are loaded several times
with this modification.
I will do more tests witht this setup.

Damien Chambe


-----Timothy Aston <Ti...@ca.ibm.com> a écrit : -----

A : ivy-user@ant.apache.org
De : Timothy Aston <Ti...@ca.ibm.com>
Date : 04/08/2010 03:04PM
Objet : Re: IvyDE and triggers?


Sorry to be talking to myself here... I got the trigger to work by
switching to <ant-build> with onlyonce="false" instead of using
<ant-call>, and now the trigger is being called.

My next issue: how to get the resultant extracted files into my build
path. Do I need to manually add each one, or is there a way for IvyDE to
pick them up automagically?


-Tim


      

RE:Re: IvyDE and triggers?

Posted by da...@a-sis.com.
Hello,

You post gived me an idea for a build problem, and I tried to run triggers
in ivyDE too. <ant-build> or <ant-call> doesn't work for me. Do you use
ivyDE 2.1 ?

I don't know how triggers could work in ivyDE 2.1 because they are not
converted as Ivy listeners:
postconfigure() method from Ivy is never called when getting the ivy
instance.
I tried to add  ivy.configureDefault();   after each Ivy.newInstance
(ivySettings);  in IvyClassPathContainerState.
It works, my post-resolve trigger is called.
I don't know if it's the right method, settings are loaded several times
with this modification.
I will do more tests witht this setup.

Damien Chambe


-----Timothy Aston <Ti...@ca.ibm.com> a écrit : -----

 A : ivy-user@ant.apache.org
 De : Timothy Aston <Ti...@ca.ibm.com>
 Date : 04/08/2010 03:04PM
 Objet : Re: IvyDE and triggers?


 Sorry to be talking to myself here... I got the trigger to work by
 switching to <ant-build> with onlyonce="false" instead of using
 <ant-call>, and now the trigger is being called.

 My next issue: how to get the resultant extracted files into my build
 path. Do I need to manually add each one, or is there a way for IvyDE to
 pick them up automagically?


 -Tim



Re: IvyDE and triggers?

Posted by Timothy Aston <Ti...@ca.ibm.com>.
Sorry to be talking to myself here... I got the trigger to work by
switching to <ant-build> with onlyonce="false" instead of using <ant-call>,
and now the trigger is being called.

My next issue: how to get the resultant extracted files into my build path.
Do I need to manually add each one, or is there a way for IvyDE to pick
them up automagically?


-Tim



From:       Timothy Aston/Ottawa/IBM@IBMCA
To:         ivy-user@ant.apache.org
Date:       04/08/2010 08:41 AM.
Subject:    Re: IvyDE and triggers?



My trigger is based largely on the example in the docs. Here it is:

<triggers>
<ant-call target="untar-trigger" prefix="dep"
event="post-download-artifact" filter="type=tar.gz AND status=successful"/>
</triggers>

<target name="untar-trigger">
<echo>
untar trigger:
organisation=${dep.organisation}
module=${dep.module}
revision=${dep.revision}
artifact=${dep.artifact}
type=${dep.type}
ext=${dep.ext}
origin=${dep.origin}
local=${dep.local}
size=${dep.size}
file=${dep.file}
</echo>
<mkdir dir="${basedir}/trigger-out"/>
<untar src="${dep.file}" dest="${basedir}/trigger-out" compression="gzip">
<patternset includes="**/*.jar"/>
<mapper type="flatten" />
</untar>
</target>

I guess my issue is, using ant-call, where can I place my target such that
IvyDE will find it?


-Tim

Maarten Coene ---04/07/2010 05:49:53 PM---As far as I know, triggers are
called from within the Ivy core, so it should work for both Ant tasks

From: Maarten Coene <ma...@yahoo.com>
To: ivy-user@ant.apache.org
Date: 04/07/2010 05:49 PM.
Subject: Re: IvyDE and triggers?



As far as I know, triggers are called from within the Ivy core, so it
should work for both Ant tasks and IDE plugins.
Are you sure the trigger hasn't been called? Could you give more info about
this trigger and when it is supposed to run?

Maarten




----- Original Message ----
From: Timothy Aston <Ti...@ca.ibm.com>
To: ivy-user@ant.apache.org
Sent: Wed, April 7, 2010 10:29:23 PM
Subject: IvyDE and triggers?



We have some legacy dependencies in our project that are .tar.gz files, and
in some of these .tar.gz files are .jar files that I would like to include
in the class path.  Of course from the ANT side of things, this is simple,
but not so much from the Eclipse side.  I tried a quick test with a trigger
and IvyDE did not seem to call it.  Has anyone been able to get this sort
of thing working?


-Tim




Re: IvyDE and triggers?

Posted by Timothy Aston <Ti...@ca.ibm.com>.
My trigger is based largely on the example in the docs.  Here it is:

      <triggers>
            <ant-call> target="untar-trigger" prefix="dep"
            event="post-download-artifact" filter="type=tar.gz AND
status=successful"/>
      </triggers>

      <target name="untar-trigger">
           <echo>
              untar trigger:
              organisation=${dep.organisation}
              module=${dep.module}
              revision=${dep.revision}
              artifact=${dep.artifact}
              type=${dep.type}
              ext=${dep.ext}
              origin=${dep.origin}
              local=${dep.local}
              size=${dep.size}
              file=${dep.file}
           </echo>
           <mkdir dir="${basedir}/trigger-out"/>
           <untar src="${dep.file}" dest="${basedir}/trigger-out"
compression="gzip">
            <patternset includes="**/*.jar"/>
                  <mapper type="flatten" />
           </untar>
      </target>

I guess my issue is, using ant-call, where can I place my target such that
IvyDE will find it?


-Tim



From:       Maarten Coene <ma...@yahoo.com>
To:         ivy-user@ant.apache.org
Date:       04/07/2010 05:49 PM.
Subject:    Re: IvyDE and triggers?



As far as I know, triggers are called from within the Ivy core, so it
should work for both Ant tasks and IDE plugins.
Are you sure the trigger hasn't been called? Could you give more info about
this trigger and when it is supposed to run?

Maarten




----- Original Message ----
From: Timothy Aston <Ti...@ca.ibm.com>
To: ivy-user@ant.apache.org
Sent: Wed, April 7, 2010 10:29:23 PM
Subject: IvyDE and triggers?



We have some legacy dependencies in our project that are .tar.gz files, and
in some of these .tar.gz files are .jar files that I would like to include
in the class path.  Of course from the ANT side of things, this is simple,
but not so much from the Eclipse side.  I tried a quick test with a trigger
and IvyDE did not seem to call it.  Has anyone been able to get this sort
of thing working?


-Tim




Re: IvyDE and triggers?

Posted by Maarten Coene <ma...@yahoo.com>.
As far as I know, triggers are called from within the Ivy core, so it should work for both Ant tasks and IDE plugins.
Are you sure the trigger hasn't been called? Could you give more info about this trigger and when it is supposed to run?

Maarten




----- Original Message ----
From: Timothy Aston <Ti...@ca.ibm.com>
To: ivy-user@ant.apache.org
Sent: Wed, April 7, 2010 10:29:23 PM
Subject: IvyDE and triggers?



We have some legacy dependencies in our project that are .tar.gz files, and
in some of these .tar.gz files are .jar files that I would like to include
in the class path.  Of course from the ANT side of things, this is simple,
but not so much from the Eclipse side.  I tried a quick test with a trigger
and IvyDE did not seem to call it.  Has anyone been able to get this sort
of thing working?


-Tim