static Exclusion convertExclusionPatternIntoExclusion ( String exceptionPattern ) throws MojoExecutionException { Matcher matcher = COORDINATE_PATTERN . matcher ( exceptionPattern ) ; if ( ! matcher . matches ( ) ) { throw new MojoExecutionException ( String . format ( "Bad artifact coordinates %s, expected format is <groupId>:<artifactId>[:<extension>][:<classifier>]" , exceptionPattern ) ) ; } return new Exclusion ( matcher . group ( 1 ) , matcher . group ( 2 ) , matcher . group ( 4 ) , matcher . group ( 6 ) ) ; }
Convert an exclusion pattern into an Exclusion object