Re: Command line argument files
FWIW, picocli is small enough to simply shade into your project. We do it in Log4j with some CLI tooling that’s included. On Sun, Nov 18, 2018 at 09:19, Stefan Bodewig wrote: > Hi Remko > > On 2018-11-15, Remko Popma wrote: > > > Would there be any interest in using picocli ( > > https://github.com/remkop/picocli) as the command line parser in > > `org.apache.tools.ant.Main`? > > Ant's core has zero dependencies and we value this property. > > > Picocli has support for @-files (https://picocli.info/#AtFiles ) to > handle > > cases where the length of the command line exceeds the OS limitations. (I > > believe there was a recent request for this feature on the user list.) > > I'm pretty sure Picocli is great. > > Personally I wouldn't want to add it just to enable an edge case. Most > people don't have Ant command lines long enough to even make them think > about @-files. -propertyfile helps with the case of many -D options and > then there always is the option to set the ANT_ARGS environment > variable. > > It should be possible to provide a Picocli ArgumentProcessor that people > who need additional features can plug into their builds and activate, > though. > > Cheers > > Stefan > > - > To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org > For additional commands, e-mail: dev-h...@ant.apache.org > > -- Matt Sicker
Re: [3/3] ant git commit: Use try-with-resources
On 2018-11-18, Stefan Bodewig wrote: > In Manifest >> /** Encoding to be used for JAR files. */ >> -public static final String JAR_ENCODING = "UTF-8"; >>>public static final Charset JAR_ENCODING = StandardCharsets.UTF_8; > chnages the type of a public constant which is not backwards > compatible. Besides, this really is not related to try-with-resources at > all. > Please revert this part. Just saw you've already taken care of this part in your next commit. Thank you. Stefan - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
Re: [3/3] ant git commit: Use try-with-resources
On 2018-11-17, wrote: in EchoXml > -} catch (BuildException e) { > -throw e; > -} catch (Exception e) { > +} catch (IOException e) { > throw new BuildException(e); before your change we'd wrap arbitrary RuntimeExceptions into BuildExceptions, after your change they'll just escape the method unwrapped. Please revert this part. In Manifest > /** Encoding to be used for JAR files. */ > -public static final String JAR_ENCODING = "UTF-8"; > +public static final Charset JAR_ENCODING = StandardCharsets.UTF_8; chnages the type of a public constant which is not backwards compatible. Besides, this really is not related to try-with-resources at all. Please revert this part. In AntAnalyzer > -ZipFile zipFile = null; > -InputStream inStream = null; > -try { ... > +try (InputStream inStream = > container.getName().endsWith(".class") > +? > Files.newInputStream(Paths.get(container.getPath())) > +: new > ZipFile(container.getPath()).getInputStream(new ZipEntry( > +classname.replace('.', '/') + > ".class"))) { I believe this will not close the ZipFile (which implements AutoCloseable itself). Please ensure it is closes when needed. Stefan - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
Re: Command line argument files
Hi Remko On 2018-11-15, Remko Popma wrote: > Would there be any interest in using picocli ( > https://github.com/remkop/picocli) as the command line parser in > `org.apache.tools.ant.Main`? Ant's core has zero dependencies and we value this property. > Picocli has support for @-files (https://picocli.info/#AtFiles ) to handle > cases where the length of the command line exceeds the OS limitations. (I > believe there was a recent request for this feature on the user list.) I'm pretty sure Picocli is great. Personally I wouldn't want to add it just to enable an edge case. Most people don't have Ant command lines long enough to even make them think about @-files. -propertyfile helps with the case of many -D options and then there always is the option to set the ANT_ARGS environment variable. It should be possible to provide a Picocli ArgumentProcessor that people who need additional features can plug into their builds and activate, though. Cheers Stefan - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
[GitHub] ant issue #79: Make DataType and Reference generic
Github user asfgit commented on the issue: https://github.com/apache/ant/pull/79 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/Ant%20Github-PR-Windows/97/ --- - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
[GitHub] ant issue #79: Make DataType and Reference generic
Github user asfgit commented on the issue: https://github.com/apache/ant/pull/79 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/Ant%20Github-PR-Linux/91/ --- - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
[GitHub] ant issue #79: Make DataType and Reference generic
Github user asfgit commented on the issue: https://github.com/apache/ant/pull/79 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/Ant%20Github-PR-Linux/90/ --- - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org
[GitHub] ant issue #79: Make DataType and Reference generic
Github user asfgit commented on the issue: https://github.com/apache/ant/pull/79 Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/Ant%20Github-PR-Windows/96/ --- - To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org