Package org.apache.maven.archiva.repository

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


            artifactReference.setClassifier( classifier );
            artifactReference.setType( packaging );

            ManagedRepositoryContent repository = repositoryFactory.getManagedRepositoryContent( repositoryId );

            String artifactPath = repository.toPath( artifactReference );

            int lastIndex = artifactPath.lastIndexOf( '/' );

            File targetPath = new File( repoConfig.getLocation(), artifactPath.substring( 0, lastIndex ) );
View Full Code Here


            artifactReference.setClassifier( classifier );
            artifactReference.setType( packaging );

            ManagedRepositoryContent repository = repositoryFactory.getManagedRepositoryContent( repositoryId );

            String artifactPath = repository.toPath( artifactReference );

            int lastIndex = artifactPath.lastIndexOf( '/' );

            File targetPath = new File( repoConfig.getLocation(), artifactPath.substring( 0, lastIndex ) );
View Full Code Here

    {
        try
        {
            String repoId = artifact.getModel().getRepositoryId();
            ManagedRepositoryContent repo = repositoryFactory.getManagedRepositoryContent( repoId );
            return repo.toPath( artifact );
        }
        catch ( RepositoryException e )
        {
            getLogger().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 )
        {
            getLogger().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() )
          {                
          artifactDAO.deleteArtifact( artifact );
          }       
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(), artifact.getVersion() );  
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

            artifactReference.setClassifier( classifier );
            artifactReference.setType( packaging );

            ManagedRepositoryContent repository = repositoryFactory.getManagedRepositoryContent( repositoryId );

            String artifactPath = repository.toPath( artifactReference );

            int lastIndex = artifactPath.lastIndexOf( '/' );

            File targetPath = new File( repoConfig.getLocation(), artifactPath.substring( 0, lastIndex ) );
View Full Code Here

        try
        {  
            ManagedRepositoryContent repoContent =
                repoFactory.getManagedRepositoryContent( artifact.getModel().getRepositoryId() );

            File file = new File( repoContent.getRepoRoot(), repoContent.toPath( artifact ) );
           
            if( !file.exists() )
            {  
                RepositoryContentIndex bytecodeIndex = repoIndexFactory.createBytecodeIndex( repoContent.getRepository() );
                RepositoryContentIndex hashcodesIndex = repoIndexFactory.createHashcodeIndex( repoContent.getRepository() );
View Full Code Here

                RepositoryContentIndex hashcodesIndex = repoIndexFactory.createHashcodeIndex( repoContent.getRepository() );
                RepositoryContentIndex fileContentIndex =
                    repoIndexFactory.createFileContentIndex( repoContent.getRepository() );
   
                FileContentRecord fileContentRecord = new FileContentRecord();
                fileContentRecord.setFilename( repoContent.toPath( artifact ) );
                fileContentIndex.deleteRecord( fileContentRecord );
   
                HashcodesRecord hashcodesRecord = new HashcodesRecord();
                hashcodesRecord.setArtifact( artifact );
                hashcodesIndex.deleteRecord( hashcodesRecord );
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.