Examples of saveArtifact()


Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        ArtifactDAO adao = dao.getArtifactDAO();
        assertNotNull( "Artifact DAO should not be null.", adao );

        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-common", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-utils", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-old", "0.1", "2004/02/15 9:01:00" ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-database", "1.0-SNAPSHOT", null ) );

        dbupdater = (DatabaseUpdater) lookup( DatabaseUpdater.class, "jdo" );
        assertNotNull( "DatabaseUpdater should not be null.", dbupdater );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        ArtifactDAO adao = dao.getArtifactDAO();
        assertNotNull( "Artifact DAO should not be null.", adao );

        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-common", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-utils", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-old", "0.1", "2004/02/15 9:01:00" ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-database", "1.0-SNAPSHOT", null ) );

        dbupdater = (DatabaseUpdater) lookup( DatabaseUpdater.class, "jdo" );
        assertNotNull( "DatabaseUpdater should not be null.", dbupdater );
    }
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        assertNotNull( "Artifact DAO should not be null.", adao );

        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-common", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-utils", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-old", "0.1", "2004/02/15 9:01:00" ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-database", "1.0-SNAPSHOT", null ) );

        dbupdater = (DatabaseUpdater) lookup( DatabaseUpdater.class, "jdo" );
        assertNotNull( "DatabaseUpdater should not be null.", dbupdater );
    }
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        // Set some mandatory values
        artifact.getModel().setLastModified( new Date() );
        artifact.getModel().setOrigin( "test" );

        // Save it.
        ArchivaArtifact savedArtifact = artiDao.saveArtifact( artifact );
        assertNotNull( savedArtifact );
        String savedKeyId = JDOHelper.getObjectId( savedArtifact.getModel() ).toString();
        assertEquals( "org.apache.maven.archiva:archiva-test-module:1.0::jar", savedKeyId );

        // Test that something has been saved.
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        assertEquals( "", firstArtifact.getClassifier() );
        assertEquals( "jar", firstArtifact.getType() );

        // Change value and save.
        savedArtifact.getModel().setOrigin( "changed" );
        artiDao.saveArtifact( savedArtifact );

        // Test that only 1 object is saved.
        assertEquals( 1, artiDao.queryArtifacts( null ).size() );

        // Get the specific artifact.
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        // Set some mandatory values
        artifact.getModel().setLastModified( new Date() );
        artifact.getModel().setOrigin( "test" );

        // Save it.
        ArchivaArtifact savedArtifact = artiDao.saveArtifact( artifact );
        assertNotNull( savedArtifact );
        String savedKeyId = JDOHelper.getObjectId( savedArtifact.getModel() ).toString();
        assertEquals( "org.apache.maven.archiva:archiva-test-module:1.0::jar:testrepo", savedKeyId );

        // Test that something has been saved.
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        assertEquals( "", firstArtifact.getClassifier() );
        assertEquals( "jar", firstArtifact.getType() );

        // Change value and save.
        savedArtifact.getModel().setOrigin( "changed" );
        artiDao.saveArtifact( savedArtifact );

        // Test that only 1 object is saved.
        assertEquals( 1, artiDao.queryArtifacts( null ).size() );

        // Get the specific artifact.
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        super.setUp();

        ArtifactDAO adao = dao.getArtifactDAO();
        assertNotNull( "Artifact DAO should not be null.", adao );

        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-common", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-utils", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-old", "0.1", "2004/02/15 9:01:00" ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-database", "1.0-SNAPSHOT", null ) );

        dbupdater = (DatabaseUpdater) lookup( DatabaseUpdater.class, "jdo" );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        ArtifactDAO adao = dao.getArtifactDAO();
        assertNotNull( "Artifact DAO should not be null.", adao );

        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-common", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-utils", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-old", "0.1", "2004/02/15 9:01:00" ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-database", "1.0-SNAPSHOT", null ) );

        dbupdater = (DatabaseUpdater) lookup( DatabaseUpdater.class, "jdo" );
        assertNotNull( "DatabaseUpdater should not be null.", dbupdater );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.saveArtifact()

        ArtifactDAO adao = dao.getArtifactDAO();
        assertNotNull( "Artifact DAO should not be null.", adao );

        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-common", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-utils", "1.0-SNAPSHOT", null ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-old", "0.1", "2004/02/15 9:01:00" ) );
        adao.saveArtifact( createArtifact( "org.apache.maven.archiva", "archiva-database", "1.0-SNAPSHOT", null ) );

        dbupdater = (DatabaseUpdater) lookup( DatabaseUpdater.class, "jdo" );
        assertNotNull( "DatabaseUpdater should not be null.", dbupdater );
    }
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.