Fix #345

Refactor maven plugin integration test
Add support for #345
Add tests for #345 as well as #346
Add documentation

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>