rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
131 stars 20 forks source link

added support for google guice #77

Closed sdorra closed 6 years ago

sdorra commented 6 years ago

Hi, first of all thank you for the fantastic library. I've tried to use airline with google guice to create the commands, but guice fails because of a conflict with the Inject annotation of airline.

So i've build a module which populates the bindings of airline to google guice, so guice can be used to create the commands and handles the injection. But in order to implement the module, i've need to pass the context of the command to the CommandFactory for the creation. I know this is a breaking change, but is see a few options:

I've also had to add a dependency to jsr305 in order to support the null injection of CommandGroupMetadata.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 381


Changes Missing Coverage Covered Lines Changed/Added Lines %
airline-core/src/main/java/com/github/rvesse/airline/parser/DefaultCommandContext.java 31 32 96.88%
<!-- Total: 76 77 98.7% -->
Files with Coverage Reduction New Missed Lines %
airline-core/src/main/java/com/github/rvesse/airline/parser/ParserUtil.java 1 68.75%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 374: 0.2%
Covered Lines: 5471
Relevant Lines: 7288

💛 - Coveralls
rvesse commented 6 years ago

Thanks, now merged. I've kicked off a deployment for the first 3.0.0-alpha-1-SNAPSHOT build so that should be available from the Sontatype OSS Repo in a little while.