public Parser()

in tooling/common/src/main/java/org/apache/karaf/minho/tooling/common/maven/Parser.java [162:188]


    public Parser( String path )
            throws MalformedURLException
    {
        if( path == null )
        {
            throw new MalformedURLException( "Path cannot be null. Syntax " + SYNTAX );
        }
        if (path.startsWith("mvn:")) {
            path = path.substring("mvn:".length());
        }
        if( path.startsWith( REPOSITORY_SEPARATOR ) || path.endsWith( REPOSITORY_SEPARATOR ) )
        {
            throw new MalformedURLException(
                    "Path cannot start or end with " + REPOSITORY_SEPARATOR + ". Syntax " + SYNTAX
            );
        }
        if( path.contains( REPOSITORY_SEPARATOR ) )
        {
            int pos = path.lastIndexOf( REPOSITORY_SEPARATOR );
            parseArtifactPart( path.substring( pos + 1 ) );
            m_repositoryURL = path.substring( 0, pos );
        }
        else
        {
            parseArtifactPart( path );
        }
    }