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

2018-03-21 Thread supertick
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-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



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

2018-03-20 Thread supertick
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-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



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

2018-03-19 Thread supertick
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-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org



[GitHub] ant-ivy issue #69: 2.4.x

2018-03-19 Thread supertick
Github user supertick commented on the issue:

https://github.com/apache/ant-ivy/pull/69
  
I think it would be great "not" to have an additional CLI option, but then 
you cannot have a System.exit(1) terminating the client code 
(https://github.com/apache/ant-ivy/blob/2.4.x/src/java/org/apache/ivy/Main.java#L313)
 just because of an error.

The errors (and the successes) can be queried out of the ResolveReport.  A 
client can programmatically make decisions based on the data returned. And the 
run() methods still throw their respective exceptions which could be caught by 
the client consumer. 

The new option is to alleviate the problematic design of having an error 
terminate a client consumer  with a System.exit.

Perhaps a design would be to copy/paste Main.java to IvyClient.java and 
remove the System.exit - but then it would be less normalized, which has its 
own flaws.


---

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



[GitHub] ant-ivy pull request #69: 2.4.x

2018-03-18 Thread supertick
GitHub user supertick opened a pull request:

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

2.4.x



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

$ git pull https://github.com/supertick/ant-ivy 2.4.x

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

https://github.com/apache/ant-ivy/pull/69.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 #69


commit f9e51f56a5d4115d00af10bc1404217805f89455
Author: grperry <grperry@...>
Date:   2018-03-18T22:07:09Z

re-use standalone ivy interface for programmatic one

commit 8f473734f05eb99568db4c5675f7b892337852b0
Author: grperry <grperry@...>
Date:   2018-03-18T22:26:50Z

backed out windows crlf




---

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