ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tjeerd Verhagen" <>
Subject Re: Calling ivy from a java class/method
Date Tue, 03 Jul 2007 11:35:12 GMT
Hi Michael,

> What is the best way to call ivy from a java program?
What is your idea? Why would you run a java program from Ivy?

It is already possible to run a program from Ivy, as it's available as a ivy
Just use the Main with the option 'mainClass':

Show all options:
java  -cp ivy.jar:commons-cli-1.0.jar  org.apache.ivy.Main  -?

Start an application, with Ivy as dependency resolver (/classloader):
java  -cp ivy.jar:commons-cli-1.0.jar  org.apache.ivy.Main  -main  <
PS: Currently it is needed that your application is a Ivy dependency. I
wrote create a patch which makes it possible to lounch your own application,
just as an application, which depends other (Ivy resolved) dependencies.
See IVY-543: Adding option 'cp', which makes it possible for main to be
loaded from file
For the details and the patch.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message