public void setCoords()

in src/main/java/org/apache/maven/resolver/internal/ant/types/Pom.java [209:229]


    public void setCoords( String coords )
    {
        checkAttributesAllowed();
        if ( file != null )
        {
            throw ambiguousSource();
        }
        if ( groupId != null || artifactId != null || version != null )
        {
            throw ambiguousCoords();
        }
        Pattern p = Pattern.compile( "([^: ]+):([^: ]+):([^: ]+)" );
        Matcher m = p.matcher( coords );
        if ( !m.matches() )
        {
            throw new BuildException( "Bad POM coordinates, expected format is <groupId>:<artifactId>:<version>" );
        }
        groupId = m.group( 1 );
        artifactId = m.group( 2 );
        version = m.group( 3 );
    }