You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Gintas Grigelionis (JIRA)" <ji...@apache.org> on 2018/03/20 07:55:00 UTC

[jira] [Resolved] (IVY-1578) Simple Programmatic Interface

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

Gintas Grigelionis resolved IVY-1578.
-------------------------------------
    Resolution: Duplicate

> Simple Programmatic Interface
> -----------------------------
>
>                 Key: IVY-1578
>                 URL: https://issues.apache.org/jira/browse/IVY-1578
>             Project: Ivy
>          Issue Type: New Feature
>            Reporter: Greg Perry
>            Priority: Major
>
> Hello,
> I'd like to thank you all for this great project and its support.
> I've submitted a previous bug
> https://issues.apache.org/jira/browse/IVY-1576 - and its fix, thanks for accepting it.
> This is an enhancement request, which I've already done for 2.4.x version.
> The changes are minimal, but the result is a very simple and easy to maintain programmatic interface for applications who desire to use Ivy as an *in-process* dependency manager.  This would be similar to MavenCli (http://maven.apache.org/ref/3.5.0/maven-embedder/project-info.html)
> The change would simply be to make Main.run public, return ResolveReport and have a noterminate option.
> A programmatic example of using Ivy would then be :
> {code:java}
> ResolveReport report = Main.run(new String[]{ "-dependency", "apache", "commons-lang 2.0", "-noterminate"});
> {code}
> since it simply re-uses the command line interface, potentially no maintenance is required (different than the MavenCli interface - as it is broken at the moment).  The noterminate option would be needed to prevent the big hammer of terminating the jvm. Some processes using Ivy in process do not want to terminate when Ivy has finished its resolve & retrieve.
> This would fix :
> * https://issues.apache.org/jira/browse/IVY-1321
> * And the many examples in stackoverflow where the entire Main class is copied/pasted as a programmatic interface 
> I think there is a great desire for a simple interface which returns results which can be inspected.  
> Here is the pull request
> https://github.com/apache/ant-ivy/pull/69
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)