You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by twogee <gi...@git.apache.org> on 2018/03/20 00:04:30 UTC
[GitHub] ant-ivy pull request #70: Make Main.run() usable programmatically
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....@...>
Date: 2018-03-20T00:00:13Z
Make Main.run() usable programmatically
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[GitHub] ant-ivy issue #70: Make Main.run() usable programmatically
Posted by twogee <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public
Posted by twogee <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[GitHub] ant-ivy issue #70: Make Main.run() usable programmatically
Posted by supertick <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public
Posted by twogee <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public
Posted by twogee <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[GitHub] ant-ivy issue #70: Make Main.run() usable programmatically
Posted by twogee <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public
Posted by supertick <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[GitHub] ant-ivy pull request #70: IVY-1321 Make Main.run() public
Posted by twogee <gi...@git.apache.org>.
Github user twogee closed the pull request at:
https://github.com/apache/ant-ivy/pull/70
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
[GitHub] ant-ivy issue #70: IVY-1321 Make Main.run() public
Posted by supertick <gi...@git.apache.org>.
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org