code: protected Plugin parsePluginString( String pluginString, String field )
          throws MojoExecutionException
      {
          if ( pluginString != null )
          {
              String[] pluginStrings = pluginString.split( ":" );
              if ( pluginStrings.length == 2 )
              {
                  Plugin plugin = new Plugin();
                  plugin.setGroupId( StringUtils.strip( pluginStrings[0] ) );
                  plugin.setArtifactId( StringUtils.strip( pluginStrings[1] ) );
  
                  return plugin;
              }
              else
              {
                  throw new MojoExecutionException( "Invalid " + field + " string: " + pluginString );
              }
          }
          else
          {
              throw new MojoExecutionException( "Invalid " + field + " string: " + pluginString );
          }
  
      }
docs: Helper method to parse and inject a Plugin.
  
  @param pluginString
  @param field
  @throws MojoExecutionException
  @return the plugin