Using IVY programatically

2010-10-08 Thread shay te

hey all.

i am writing an java application based on plug-ins , 
i wish to use IVY ,to help me with dependencies issue when installing a
plug-in at run time 

each plug-in should have some jar's he depends on ,
i need IVY to help me with what jar i can keep and what jar are not
necessary

i am new to IVY ,and i notice only XML configuration tutorial


am i at the right direction?
can IVY help me completing my task?

thank you 

-- 
View this message in context: 
http://old.nabble.com/Using-IVY-programatically-tp29914705p29914705.html
Sent from the ivy-dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: Using IVY programatically

2010-10-08 Thread Antoine Levy-Lambert

 Hello Shay,

yes, ivy can be used programmatically. I think nearly all classes have 
public interfaces.


here a snippet of a piece of code written on my project using ivy 2.1.x 
APIs (not sure if there is any change in 2.2.x)


import org.apache.ivy.Ivy;
import org.apache.ivy.Ivy.IvyCallback;
import org.apache.ivy.core.IvyContext;
import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
import org.apache.ivy.core.module.id.ModuleRevisionId;
import org.apache.ivy.core.resolve.ResolvedModuleRevision;
import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry;


Ivy ivy = new Ivy();
configureIvy(ivy);
// using the ivycallback system
MyModuleDescriptor myModuleDescriptor = new MyModuleDescriptor();
ModuleDescriptor md = myModuleDescriptor.parse(ivyFile, ivy);

AFAIK the class org.apache.ivy.Ivy has most of the methods that you need.

Hopes this helps,

Antoine

On 10/8/2010 8:09 AM, shay te wrote:

hey all.

i am writing an java application based on plug-ins ,
i wish to use IVY ,to help me with dependencies issue when installing a
plug-in at run time

each plug-in should have some jar's he depends on ,
i need IVY to help me with what jar i can keep and what jar are not
necessary

i am new to IVY ,and i notice only XML configuration tutorial


am i at the right direction?
can IVY help me completing my task?

thank you




-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Review Needed for "Publishing Maven Artifacts with Ivy" Doc

2010-10-08 Thread Stefan Bodewig
Hi,

I have one issue that is slowly bubbling up on my TODO list: I promised
to provide Ant+Ivy content for


Rather than starting a lengthy thread on this list, I've created a Wiki
page 

Please review what I've written, in particular the Ivy specific parts
since I'm really a newbie when it comes to Ivy.  If anybody could
explain to me why we use the deliver task at all, I'd be grateful.

Thanks

Stefan

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: Review Needed for "Publishing Maven Artifacts with Ivy" Doc

2010-10-08 Thread Jean-Louis Boudart
Hi there,

 is used to generate the ivy.xml before publication based on
the last resolved informations.

Why are we  generating an ivy.xml here ?
Because when publishing, ivy adds some attributes in the generated ivy.xml
file (like publication date, publication revision, publication branch).

One other goal of the  is to replace dynamic revisions in
project dependencies (if you use latest.revision, or [2.2.+[ or stuff like
that in your ).

To sum up  fixes every dynamic value in the ivy.xml file to
make it reproducible.

 can make the  process if you haven't do it explictly
before. So you can consider  as optionnal.
In some cases, invoking explicitly  is required :

   - If you want to do some post processing on ivy.xml file before
   publishing
   - If you're using  recursive delivery

HTH

2010/10/8 Stefan Bodewig 

> Hi,
>
> I have one issue that is slowly bubbling up on my TODO list: I promised
> to provide Ant+Ivy content for
> 
>
> Rather than starting a lengthy thread on this list, I've created a Wiki
> page 
>
> Please review what I've written, in particular the Ivy specific parts
> since I'm really a newbie when it comes to Ivy.  If anybody could
> explain to me why we use the deliver task at all, I'd be grateful.
>
> Thanks
>
>Stefan
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
> For additional commands, e-mail: dev-h...@ant.apache.org
>
>


-- 
Jean Louis Boudart
Independent consultant
Project Lead http://www.easyant.org


Re: Review Needed for "Publishing Maven Artifacts with Ivy" Doc

2010-10-08 Thread Jean-Louis Boudart
At the beggining of the documentation you say "In addition you will need a
minimal POM for your jar".

Are you planning to maintain dependencies in both ivy.xml / pom.xml
manually?
Ivy offers a task that can generate a pom.xml from a given ivy.xml (
http://ant.apache.org/ivy/history/trunk/use/makepom.html). However the
support is quite limited and provided many limations.

I'll get back later with some additional informations on the limitations and
already possible alternatives.

Stay tuned :p



2010/10/8 Jean-Louis Boudart 

> Hi there,
>
>  is used to generate the ivy.xml before publication based on
> the last resolved informations.
>
> Why are we  generating an ivy.xml here ?
> Because when publishing, ivy adds some attributes in the generated ivy.xml
> file (like publication date, publication revision, publication branch).
>
> One other goal of the  is to replace dynamic revisions in
> project dependencies (if you use latest.revision, or [2.2.+[ or stuff like
> that in your ).
>
> To sum up  fixes every dynamic value in the ivy.xml file to
> make it reproducible.
>
>  can make the  process if you haven't do it explictly
> before. So you can consider  as optionnal.
> In some cases, invoking explicitly  is required :
>
>- If you want to do some post processing on ivy.xml file before
>publishing
>- If you're using  recursive delivery
>
> HTH
>
> 2010/10/8 Stefan Bodewig 
>
> Hi,
>>
>> I have one issue that is slowly bubbling up on my TODO list: I promised
>> to provide Ant+Ivy content for
>> 
>>
>> Rather than starting a lengthy thread on this list, I've created a Wiki
>> page 
>>
>> Please review what I've written, in particular the Ivy specific parts
>> since I'm really a newbie when it comes to Ivy.  If anybody could
>> explain to me why we use the deliver task at all, I'd be grateful.
>>
>> Thanks
>>
>>Stefan
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
>> For additional commands, e-mail: dev-h...@ant.apache.org
>>
>>
>
>
> --
> Jean Louis Boudart
> Independent consultant
> Project Lead http://www.easyant.org
>



-- 
Jean Louis Boudart
Independent consultant
Project Lead http://www.easyant.org


Serge MARCOTTE est absent(e).

2010-10-08 Thread serge . marcotte

Je serai absent(e) du  2010-10-08 au 2010-10-09.

Je répondrai à votre message dès mon retour.

Pour toutes urgences, rejoindre Daniel Leclerc (7473)


-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: Review Needed for "Publishing Maven Artifacts with Ivy" Doc

2010-10-08 Thread Antoine Levy-Lambert

 Hello Stefan,

I have been too busy to do any ant related work since a few months but I 
hope to catch up now.
Your wiki page is very good. I also had promised to work on this how to 
to a colleague of maven or of the repository but did not deliver :(

Thanks for this,

Antoine

On 10/8/2010 9:58 AM, Stefan Bodewig wrote:

Hi,

I have one issue that is slowly bubbling up on my TODO list: I promised
to provide Ant+Ivy content for


Rather than starting a lengthy thread on this list, I've created a Wiki
page

Please review what I've written, in particular the Ivy specific parts
since I'm really a newbie when it comes to Ivy.  If anybody could
explain to me why we use the deliver task at all, I'd be grateful.

Thanks

 Stefan




-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: Review Needed for "Publishing Maven Artifacts with Ivy" Doc

2010-10-08 Thread Maarten Coene
The ivy:makepom task has been greatly enhanced in Ivy 2.2.0. It is now possible 
to specify a custom pom template containing information about the license, SCM, 
plugins, developers, ...

Here is how Ivy publishes itself to the Nexus repository.















We declare some additional artifacts (like the generated pom and the 
sources/javadocs) inside the ivy:publish task because the ivy.xml doesn't 
contain them.
In addition, the ivysetting-release.xml configures Ivy to automatically create 
a 
PGP signature of the artifacts. So there is no need to declare them any longer 
as artifact.

Maarten




- Original Message 
From: Jean-Louis Boudart 
To: Ant Developers List 
Sent: Fri, October 8, 2010 5:03:37 PM
Subject: Re: Review Needed for "Publishing Maven Artifacts with Ivy" Doc

At the beggining of the documentation you say "In addition you will need a
minimal POM for your jar".

Are you planning to maintain dependencies in both ivy.xml / pom.xml
manually?
Ivy offers a task that can generate a pom.xml from a given ivy.xml (
http://ant.apache.org/ivy/history/trunk/use/makepom.html). However the
support is quite limited and provided many limations.

I'll get back later with some additional informations on the limitations and
already possible alternatives.

Stay tuned :p



2010/10/8 Jean-Louis Boudart 

> Hi there,
>
>  is used to generate the ivy.xml before publication based on
> the last resolved informations.
>
> Why are we  generating an ivy.xml here ?
> Because when publishing, ivy adds some attributes in the generated ivy.xml
> file (like publication date, publication revision, publication branch).
>
> One other goal of the  is to replace dynamic revisions in
> project dependencies (if you use latest.revision, or [2.2.+[ or stuff like
> that in your ).
>
> To sum up  fixes every dynamic value in the ivy.xml file to
> make it reproducible.
>
>  can make the  process if you haven't do it explictly
> before. So you can consider  as optionnal.
> In some cases, invoking explicitly  is required :
>
>- If you want to do some post processing on ivy.xml file before
>publishing
>- If you're using  recursive delivery
>
> HTH
>
> 2010/10/8 Stefan Bodewig 
>
> Hi,
>>
>> I have one issue that is slowly bubbling up on my TODO list: I promised
>> to provide Ant+Ivy content for
>> 
>>
>> Rather than starting a lengthy thread on this list, I've created a Wiki
>> page 
>>
>> Please review what I've written, in particular the Ivy specific parts
>> since I'm really a newbie when it comes to Ivy.  If anybody could
>> explain to me why we use the deliver task at all, I'd be grateful.
>>
>> Thanks
>>
>>Stefan
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
>> For additional commands, e-mail: dev-h...@ant.apache.org
>>
>>
>
>
> --
> Jean Louis Boudart
> Independent consultant
> Project Lead http://www.easyant.org
>



-- 
Jean Louis Boudart
Independent consultant
Project Lead http://www.easyant.org



  

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



Re: Using IVY programatically

2010-10-08 Thread Maarten Coene
Shay,

please don't post Ivy questions to ivy-...@incubator.apache.org since that list 
is no longer used.
You should post your Ivy questions to ivy-u...@ant.apache.org instead (or 
dev@ant.apache.org if they are related to Ivy development).

Maarten



- Original Message 
From: Antoine Levy-Lambert 
To: Ant Developers List 
Sent: Fri, October 8, 2010 2:33:12 PM
Subject: Re: Using IVY programatically

Hello Shay,

yes, ivy can be used programmatically. I think nearly all classes have public 
interfaces.

here a snippet of a piece of code written on my project using ivy 2.1.x APIs 
(not sure if there is any change in 2.2.x)

import org.apache.ivy.Ivy;
import org.apache.ivy.Ivy.IvyCallback;
import org.apache.ivy.core.IvyContext;
import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
import org.apache.ivy.core.module.id.ModuleRevisionId;
import org.apache.ivy.core.resolve.ResolvedModuleRevision;
import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry;


Ivy ivy = new Ivy();
configureIvy(ivy);
// using the ivycallback system
MyModuleDescriptor myModuleDescriptor = new MyModuleDescriptor();
ModuleDescriptor md = myModuleDescriptor.parse(ivyFile, ivy);

AFAIK the class org.apache.ivy.Ivy has most of the methods that you need.

Hopes this helps,

Antoine

On 10/8/2010 8:09 AM, shay te wrote:
> hey all.
> 
> i am writing an java application based on plug-ins ,
> i wish to use IVY ,to help me with dependencies issue when installing a
> plug-in at run time
> 
> each plug-in should have some jar's he depends on ,
> i need IVY to help me with what jar i can keep and what jar are not
> necessary
> 
> i am new to IVY ,and i notice only XML configuration tutorial
> 
> 
> am i at the right direction?
> can IVY help me completing my task?
> 
> thank you
> 


-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org


  

-
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org