private OverriddenCucumberOptionsParameters overrideParametersWithCucumberOptions ( ) throws MojoExecutionException { try { final OverriddenCucumberOptionsParameters overriddenParameters = new OverriddenCucumberOptionsParameters ( ) . setTags ( tags ) . setGlue ( glue ) . setStrict ( strict ) . setPlugins ( parseFormatAndPlugins ( format , plugins == null ? new ArrayList < Plugin > ( ) : plugins ) ) . setMonochrome ( monochrome ) ; if ( cucumberOptions != null && cucumberOptions . length ( ) > 0 ) { final RuntimeOptions options = new RuntimeOptions ( cucumberOptions ) ; overriddenParameters . overrideTags ( options . getFilters ( ) ) . overrideGlue ( options . getGlue ( ) ) . overridePlugins ( parsePlugins ( options . getPluginNames ( ) ) ) . overrideStrict ( options . isStrict ( ) ) . overrideMonochrome ( options . isMonochrome ( ) ) ; } return overriddenParameters ; } catch ( IllegalArgumentException e ) { throw new MojoExecutionException ( this , "Invalid parameter. " , e . getMessage ( ) ) ; } }
Overrides the parameters with cucumber . options if they have been specified . Plugins have somewhat limited support .