[GitHub] ant-ivy pull request #70: Make Main.run() usable programmatically

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy pull request #70: Make Main.run() usable programmatically

bodewig
GitHub user twogee opened a pull request:

    https://github.com/apache/ant-ivy/pull/70

    Make Main.run() usable programmatically

    Inspired by #69

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/twogee/ant-ivy ivy-1321

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ant-ivy/pull/70.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #70
   
----
commit ab638a8f5bb74d83299d006fcc0f041c21338610
Author: twogee <g.grigelionis@...>
Date:   2018-03-20T00:00:13Z

    Make Main.run() usable programmatically

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy issue #70: Make Main.run() usable programmatically

bodewig
Github user twogee commented on the issue:

    https://github.com/apache/ant-ivy/pull/70
 
    This addresses IVY-1321 and IVY-1578


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy issue #70: Make Main.run() usable programmatically

bodewig
In reply to this post by bodewig
Github user supertick commented on the issue:

    https://github.com/apache/ant-ivy/pull/70
 
    I agree @twogee  now that I've seen your change, your solution would be better.  
    I felt too,  adding a new command line option was not the best, but also felt strongly, with minimal work the standalone interface could be supported.  I'm glad your change supports the interface without the additional option.
   
    Now perhaps these https://www.google.com/search?q=ivy+programmatic+stackoverflow 
    can be answered simply with
   
    ```
    try {
        CommandLineParser parser = getParser();
        // parse the command line arguments  
        CommandLine line = parser.parse(args);        
        ResolveReport  report = Main.run(line, false);
        // iterate through the report
    } catch (Exception e) {
        // do something to handle error
    }
    ```
   
    Thanks.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy issue #70: Make Main.run() usable programmatically

bodewig
In reply to this post by bodewig
Github user twogee commented on the issue:

    https://github.com/apache/ant-ivy/pull/70
 
    Actually, you should be able to do
   
    ```
    try {
        ResolveReport  report = Main.run(args, false);
        // iterate through the report
    } catch (Exception e) {
        // do something to handle error
    }
    ```
   
    But, I was hasty and the tests still fail. I'll try to rectify that later today.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public

bodewig
In reply to this post by bodewig
Github user twogee commented on the issue:

    https://github.com/apache/ant-ivy/pull/70
 
    I'm a bit surprised that StackOverflow does not refer to Apache [Confluence](https://cwiki.apache.org/confluence/display/IVY/Programmatic+use+of+Ivy)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public

bodewig
In reply to this post by bodewig
Github user twogee commented on the issue:

    https://github.com/apache/ant-ivy/pull/70
 
    @supertick if you're fine with this PR, please close #69. I will merge this one later.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public

bodewig
In reply to this post by bodewig
Github user supertick commented on the issue:

    https://github.com/apache/ant-ivy/pull/70
 
    I would make a default overload which took only a String[] arg to model **exactly** the Main.main input, but all the rest is perfect, including the better isCli boolean vs silly cli option
   
    ResolveReport report = Main.run(new String[]{ .... exact standalone api ... })
   
    I would leave the Exception throws signature in the overloaded run method...
   
    Thanks for your consideration, work, and mention ;) !
    Cheers !


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public

bodewig
In reply to this post by bodewig
Github user twogee commented on the issue:

    https://github.com/apache/ant-ivy/pull/70
 
    Thanks for bearing with me 😉please see the revised commit.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public

bodewig
In reply to this post by bodewig
Github user supertick commented on the issue:

    https://github.com/apache/ant-ivy/pull/70
 
    Looks great !
    (had to look up what REPL is - thanks for the heads up)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] ant-ivy pull request #70: IVY-1321 Make Main.run() public

bodewig
In reply to this post by bodewig
Github user twogee closed the pull request at:

    https://github.com/apache/ant-ivy/pull/70


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]