> On March 12, 2014, 7:27 p.m., Camille Fournier wrote: > > ./src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java, > > line 82 > > <https://reviews.apache.org/r/19089/diff/1/?file=517046#file517046line82> > > > > Looks like the apache commons dep is only for the releaseaudit > > workflow, not for the project in general > > Raul Gutierrez Segales wrote: > what about things like: > > > https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/cli/CliCommand.java > > i see: > > ``` > import org.apache.commons... > ``` > > there. > > Raul Gutierrez Segales wrote: > just asking to learn what the policy is, i am totally fine with not using > it for this simple case (but if we can, sure it makes it nicer).
I hope you are asking about the way we have used the commons-cli.jar ? Its for ZK shell commands - this simplifies the parsing logic of command line options. Here first define the 'options' supported in my command. Now when user invokes the command, will just pass the 'options' and 'args' to the parser, rest he will take care for me. Also, there are many other useful apis. Please have a look at CreateCommand.java I've seen many apache projects has adopted this approach. - Rakesh ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19089/#review36966 ----------------------------------------------------------- On March 12, 2014, 4:17 a.m., Rakesh R wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19089/ > ----------------------------------------------------------- > > (Updated March 12, 2014, 4:17 a.m.) > > > Review request for zookeeper, fpj, michim, and Raul Gutierrez Segales. > > > Bugs: ZOOKEEPER-1878 > https://issues.apache.org/jira/browse/ZOOKEEPER-1878 > > > Repository: zookeeper > > > Description > ------- > > See ZOOKEEPER-1878 > > > Diffs > ----- > > ./src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java > 1566210 > ./src/java/test/org/apache/zookeeper/server/ZooKeeperServerMainTest.java > 1566210 > > Diff: https://reviews.apache.org/r/19089/diff/ > > > Testing > ------- > > Test included > > > Thanks, > > Rakesh R > >