public static ArtifactCoordinates fromString(String string){
  final Matcher matcher=VALID_PATTERN.matcher(string);
  if (matcher.matches()) {
    if (matcher.group(4) != null) {
      return new ArtifactCoordinates(matcher.group(1),matcher.group(2),matcher.group(3),matcher.group(4));
    }
 else {
      return new ArtifactCoordinates(matcher.group(1),matcher.group(2),matcher.group(3));
    }
  }
 else {
    throw new IllegalArgumentException(string);
  }
}

public static ArtifactCoordinates fromString ( String string ) { final Matcher matcher = VALID_PATTERN . matcher ( string ) ; if ( matcher . matches ( ) ) { if ( matcher . group ( 4 ) != null ) { return new ArtifactCoordinates ( matcher . group ( 1 ) , matcher . group ( 2 ) , matcher . group ( 3 ) , matcher . group ( 4 ) ) ; } else { return new ArtifactCoordinates ( matcher . group ( 1 ) , matcher . group ( 2 ) , matcher . group ( 3 ) ) ; } } else { throw new IllegalArgumentException ( string ) ; } }
parse a string and produce artifact coordinates from it .
