Examples of LegacyArtifactPath


Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

    }

    public void testStruts2ValidationFrameworkWithNullInputs() throws Exception
    {
        // prep
        LegacyArtifactPath legacyArtifactPath = createLegacyArtifactPath(null);
        populateAddLegacyArtifactPathActionFields(addLegacyArtifactPathAction, legacyArtifactPath, null, null, null, null, null);

        // test
        actionValidatorManager.validate(addLegacyArtifactPathAction, EMPTY_STRING);
View Full Code Here

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

    }

    public void testStruts2ValidationFrameworkWithBlankInputs() throws Exception
    {
        // prep
        LegacyArtifactPath legacyArtifactPath = createLegacyArtifactPath(EMPTY_STRING);
        populateAddLegacyArtifactPathActionFields(addLegacyArtifactPathAction, legacyArtifactPath, EMPTY_STRING, EMPTY_STRING, EMPTY_STRING, EMPTY_STRING, EMPTY_STRING);

        // test
        actionValidatorManager.validate(addLegacyArtifactPathAction, EMPTY_STRING);
View Full Code Here

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

    }

    public void testStruts2ValidationFrameworkWithInvalidInputs() throws Exception
    {
        // prep
        LegacyArtifactPath legacyArtifactPath = createLegacyArtifactPath(LEGACY_ARTIFACT_PATH_PATH_INVALID_INPUT);
        populateAddLegacyArtifactPathActionFields(addLegacyArtifactPathAction, legacyArtifactPath, GROUP_ID_INVALID_INPUT, ARTIFACT_ID_INVALID_INPUT, VERSION_INVALID_INPUT, CLASSIFIER_INVALID_INPUT, TYPE_INVALID_INPUT);

        // test
        actionValidatorManager.validate(addLegacyArtifactPathAction, EMPTY_STRING);
View Full Code Here

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

    }

    public void testStruts2ValidationFrameworkWithValidInputs() throws Exception
    {
        // prep
        LegacyArtifactPath legacyArtifactPath = createLegacyArtifactPath(LEGACY_ARTIFACT_PATH_PATH_VALID_INPUT);
        populateAddLegacyArtifactPathActionFields(addLegacyArtifactPathAction, legacyArtifactPath, GROUP_ID_VALID_INPUT, ARTIFACT_ID_VALID_INPUT, VERSION_VALID_INPUT, CLASSIFIER_VALID_INPUT, TYPE_VALID_INPUT);

        // test
        actionValidatorManager.validate(addLegacyArtifactPathAction, EMPTY_STRING);
View Full Code Here

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

        assertFalse(addLegacyArtifactPathAction.hasFieldErrors());
    }

    private LegacyArtifactPath createLegacyArtifactPath(String path)
    {
        LegacyArtifactPath legacyArtifactPath = new LegacyArtifactPath();
        legacyArtifactPath.setPath(path);
        return legacyArtifactPath;
    }
View Full Code Here

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

    {
        getLogger().info( "remove [" + path + "] from legacy artifact path resolution" );
        Configuration configuration = archivaConfiguration.getConfiguration();
        for ( Iterator iterator = configuration.getLegacyArtifactPaths().iterator(); iterator.hasNext(); )
        {
            LegacyArtifactPath legacyArtifactPath = (LegacyArtifactPath) iterator.next();
            if (legacyArtifactPath.match( path ))
            {
                iterator.remove();
            }
        }
        return saveConfiguration( configuration );
View Full Code Here

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

    private String type;


    public void prepare()
    {
        this.legacyArtifactPath = new LegacyArtifactPath();
    }
View Full Code Here

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

        // First, look if a custom resolution rule has been set for this artifact
        Collection legacy = configuration.getConfiguration().getLegacyArtifactPaths();
        for ( Iterator iterator = legacy.iterator(); iterator.hasNext(); )
        {
            LegacyArtifactPath legacyPath = (LegacyArtifactPath) iterator.next();
            if ( legacyPath.match( path ) )
            {     
          artifact.setGroupId( legacyPath.getGroupId() );
          artifact.setArtifactId( legacyPath.getArtifactId() );
          artifact.setClassifier( legacyPath.getClassifier() );
          artifact.setVersion( legacyPath.getVersion() );
          artifact.setType( legacyPath.getType() );
                return artifact;
            }
        }

        String normalizedPath = StringUtils.replace( path, "\\", "/" );
View Full Code Here

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

    {
        log.info( "remove [" + path + "] from legacy artifact path resolution" );
        Configuration configuration = archivaConfiguration.getConfiguration();
        for ( Iterator<LegacyArtifactPath> iterator = configuration.getLegacyArtifactPaths().iterator(); iterator.hasNext(); )
        {
            LegacyArtifactPath legacyArtifactPath = (LegacyArtifactPath) iterator.next();
            if (legacyArtifactPath.match( path ))
            {
                iterator.remove();
            }
        }
        return saveConfiguration( configuration );
View Full Code Here

Examples of org.apache.maven.archiva.configuration.LegacyArtifactPath

    private String type;


    public void prepare()
    {
        this.legacyArtifactPath = new LegacyArtifactPath();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.