Examples of KnownRepositoryContentConsumer


Examples of org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer

     * @throws Exception
     */
    public void testReleasedSnapshotsWereNotCleaned()
        throws Exception
    {
        KnownRepositoryContentConsumer repoPurgeConsumer =
            (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class,
                                                     "repo-purge-consumer-by-retention-count" );

        populateDbForReleasedSnapshotsTest();

        ManagedRepositoryConfiguration repoConfiguration = getRepoConfiguration();
        repoConfiguration.setDeleteReleasedSnapshots( false ); // Set to NOT delete released snapshots.
        addRepoToConfiguration( "retention-count", repoConfiguration );

        repoPurgeConsumer.beginScan( repoConfiguration );

        String repoRoot = prepareTestRepo();

        repoPurgeConsumer.processFile( PATH_TO_RELEASED_SNAPSHOT );

        // check if the snapshot wasn't removed
        String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-plugin-plugin";

        assertExists( projectRoot + "/2.3-SNAPSHOT" );
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.