Package org.apache.maven.archiva.repository

Examples of org.apache.maven.archiva.repository.ManagedRepositoryContent.toPath()


    {  
        try
        {
            ManagedRepositoryContent repoContent =
                repoFactory.getManagedRepositoryContent( artifact.getModel().getRepositoryId() );   
            File file = new File( repoContent.getRepoRoot(), repoContent.toPath( artifact ) );
           
            if( file.getAbsolutePath().endsWith( ".jar" ) || file.getAbsolutePath().endsWith( ".war" ) ||
                    file.getAbsolutePath().endsWith( ".ear" ) || file.getAbsolutePath().endsWith( ".zip" ) ||
                    file.getAbsolutePath().endsWith( ".tar.gz" ) || file.getAbsolutePath().endsWith( ".tar.bz2" ) ||
                    file.getAbsolutePath().endsWith( ".car" ) || file.getAbsolutePath().endsWith( ".sar" ) ||
View Full Code Here


    {
        try
        {
            String repoId = artifact.getModel().getRepositoryId();
            ManagedRepositoryContent repo = repositoryFactory.getManagedRepositoryContent( repoId );
            return repo.toPath( artifact );
        }
        catch ( RepositoryException e )
        {
            log.warn( "Unable to calculate path for artifact: " + artifact );
            return "";
View Full Code Here

    {
        try
        {
            String repoId = artifact.getModel().getRepositoryId();
            ManagedRepositoryContent repo = repositoryFactory.getManagedRepositoryContent( repoId );
            return repo.toPath( artifact );
        }
        catch ( RepositoryException e )
        {
            log.warn( "Unable to calculate path for artifact: " + artifact );
            return "";
View Full Code Here

        try
        {
            ManagedRepositoryContent repositoryContent =
                repositoryFactory.getManagedRepositoryContent( artifact.getModel().getRepositoryId() );

            File file = new File( repositoryContent.getRepoRoot(), repositoryContent.toPath( artifact ) );

            if ( !file.exists() )
            {
                ArchivaProjectModel projectModel =
                    projectModelDAO.getProjectModel( artifact.getGroupId(), artifact.getArtifactId(),
View Full Code Here

    {
        ManagedRepositoryContent repo = getRepository( artifact );

        RepositoryProblem problem = new RepositoryProblem();
        problem.setRepositoryId( artifact.getModel().getRepositoryId() );
        problem.setPath( repo.toPath( artifact ) );
        problem.setGroupId( artifact.getGroupId() );
        problem.setArtifactId( artifact.getArtifactId() );
        problem.setVersion( artifact.getVersion() );
        problem.setType( CorruptArtifactReport.PROBLEM_TYPE_CORRUPT_ARTIFACT );
        problem.setOrigin( getId() );
View Full Code Here

        try
        {
            ManagedRepositoryContent repositoryContent =
                repositoryFactory.getManagedRepositoryContent( artifact.getModel().getRepositoryId() );

            File file = new File( repositoryContent.getRepoRoot(), repositoryContent.toPath( artifact ) );

            if( !file.exists() )
            {                   
                artifactDAO.deleteArtifact( artifact );
View Full Code Here

    {
        try
        {
            String repoId = artifact.getModel().getRepositoryId();
            ManagedRepositoryContent repo = repositoryFactory.getManagedRepositoryContent( repoId );
            return repo.toPath( artifact );
        }
        catch ( RepositoryException e )
        {
            log.warn( "Unable to calculate path for artifact: " + artifact );
            return "";
View Full Code Here

    {
        try
        {
            String repoId = artifact.getModel().getRepositoryId();
            ManagedRepositoryContent repo = repositoryFactory.getManagedRepositoryContent( repoId );
            return repo.toPath( artifact );
        }
        catch ( RepositoryException e )
        {
            log.warn( "Unable to calculate path for artifact: " + artifact );
            return "";
View Full Code Here

        ManagedRepositoryConfiguration repository = repoContent.getRepository();

        IndexingContext context = null;
        try
        {
            File artifactFile = new File( repoContent.getRepoRoot(), repoContent.toPath( artifact ) );

            if ( !artifactFile.exists() )
            {
                context = TaskCreator.createContext( repository );
View Full Code Here

            new ArchivaArtifact( "org.apache.archiva", "archiva-lucene-consumers", "1.2", null, "jar", "test-repo" );

        ManagedRepositoryContent repoContent = new ManagedDefaultRepositoryContent();
        repoContent.setRepository( repositoryConfig );

        File artifactFile = new File( repoContent.getRepoRoot(), repoContent.toPath( artifact ) );

        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( repositoryConfig.getId() ),
                                            repoContent );

        repoFactoryControl.replay();
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.