Package org.apache.maven.archiva.model

Examples of org.apache.maven.archiva.model.RepositoryProblem


    }

    private void addProblem( ArchivaArtifact artifact, String msg )
        throws ConsumerException
    {
        RepositoryProblem problem = new RepositoryProblem();
        problem.setRepositoryId( artifact.getModel().getRepositoryId() );
        problem.setPath( toPath( artifact ) );
        problem.setGroupId( artifact.getGroupId() );
        problem.setArtifactId( artifact.getArtifactId() );
        problem.setVersion( artifact.getVersion() );
        problem.setType( CorruptArtifactReport.PROBLEM_TYPE_CORRUPT_ARTIFACT );
        problem.setOrigin( getId() );
        problem.setMessage( msg );

        try
        {
            dao.getRepositoryProblemDAO().saveRepositoryProblem( problem );
        }
View Full Code Here


                {
                    // Skip reference to itself.
                    continue;
                }

                RepositoryProblem problem = new RepositoryProblem();
                problem.setRepositoryId( dupArtifact.getModel().getRepositoryId() );
                problem.setPath( toPath( dupArtifact ) );
                problem.setGroupId( artifact.getGroupId() );
                problem.setArtifactId( artifact.getArtifactId() );
                problem.setVersion( artifact.getVersion() );
                problem.setType( DuplicateArtifactReport.PROBLEM_TYPE_DUPLICATE_ARTIFACTS );
                problem.setOrigin( getId() );
                problem.setMessage( "Duplicate Artifact Detected: " + artifact + " <--> " + dupArtifact );

                try
                {
                    getLogger().debug( "Found duplicate artifact: " + problem );
                    dao.getRepositoryProblemDAO().saveRepositoryProblem( problem );
View Full Code Here

    {
        List<RepositoryProblem> problemArtifacts = dao.getRepositoryProblemDAO().queryRepositoryProblems( configureConstraint() );

        String contextPath =
            request.getRequestURL().substring( 0, request.getRequestURL().indexOf( request.getRequestURI() ) );
        RepositoryProblem problemArtifact;
        RepositoryProblemReport problemArtifactReport;
        for ( int i = 0; i < problemArtifacts.size(); i++ )
        {
            problemArtifact = (RepositoryProblem) problemArtifacts.get( i );
            problemArtifactReport = new RepositoryProblemReport( problemArtifact );

            problemArtifactReport.setGroupURL( contextPath + "/browse/" + problemArtifact.getGroupId() );
            problemArtifactReport.setArtifactURL(
                contextPath + "/browse/" + problemArtifact.getGroupId() + "/" + problemArtifact.getArtifactId() );

            reports.add( problemArtifactReport );
        }

        if ( reports.size() <= rowCount )
View Full Code Here

        List<RepositoryProblem> problemArtifacts =
            dao.getRepositoryProblemDAO().queryRepositoryProblems( configureConstraint() );

        String contextPath =
            request.getRequestURL().substring( 0, request.getRequestURL().indexOf( request.getRequestURI() ) );
        RepositoryProblem problemArtifact;
        RepositoryProblemReport problemArtifactReport;
        for ( int i = 0; i < problemArtifacts.size(); i++ )
        {
            problemArtifact = (RepositoryProblem) problemArtifacts.get( i );
            problemArtifactReport = new RepositoryProblemReport( problemArtifact );

            problemArtifactReport.setGroupURL( contextPath + "/browse/" + problemArtifact.getGroupId() );
            problemArtifactReport.setArtifactURL(
                contextPath + "/browse/" + problemArtifact.getGroupId() + "/" + problemArtifact.getArtifactId() );

            reports.add( problemArtifactReport );
        }

        if ( reports.size() <= rowCount )
View Full Code Here

    }

    private void addProblem( ArchivaArtifact artifact, String msg )
        throws ConsumerException
    {
        RepositoryProblem problem = new RepositoryProblem();
        problem.setRepositoryId( artifact.getModel().getRepositoryId() );
        problem.setPath( toPath( artifact ) );
        problem.setGroupId( artifact.getGroupId() );
        problem.setArtifactId( artifact.getArtifactId() );
        problem.setVersion( artifact.getVersion() );
        problem.setType( LocationArtifactsReport.PROBLEM_TYPE_BAD_ARTIFACT_LOCATION );
        problem.setOrigin( getId() );
        problem.setMessage( msg );

        try
        {
            dao.getRepositoryProblemDAO().saveRepositoryProblem( problem );
        }
View Full Code Here

                {
                    // Skip reference to itself.
                    continue;
                }

                RepositoryProblem problem = new RepositoryProblem();
                problem.setRepositoryId( dupArtifact.getModel().getRepositoryId() );
                problem.setPath( toPath( dupArtifact ) );
                problem.setGroupId( artifact.getGroupId() );
                problem.setArtifactId( artifact.getArtifactId() );
                problem.setVersion( artifact.getVersion() );
                problem.setType( DuplicateArtifactReport.PROBLEM_TYPE_DUPLICATE_ARTIFACTS );
                problem.setOrigin( getId() );
                problem.setMessage( "Duplicate Artifact Detected: " + artifact + " <--> " + dupArtifact );

                try
                {
                    getLogger().debug( "Found duplicate artifact: " + problem );
                    dao.getRepositoryProblemDAO().saveRepositoryProblem( problem );
View Full Code Here

    private void addProblem( ArchivaArtifact artifact, String msg )
        throws ConsumerException
    {
        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() );
        problem.setMessage( msg );

        try
        {
            dao.getRepositoryProblemDAO().saveRepositoryProblem( problem );
        }
View Full Code Here

        return artifact;
    }

    public RepositoryProblem createRepoProblem( String groupId )
    {
        RepositoryProblem repoProblem = new RepositoryProblem();

        repoProblem.setGroupId( groupId );
        repoProblem.setArtifactId( "artifactId" );
        repoProblem.setMessage( "message" );
        repoProblem.setOrigin( "origin" );
        repoProblem.setPath( "path" );
        repoProblem.setRepositoryId( "repoId" );
        repoProblem.setType( "type" );
        repoProblem.setVersion( "version" );

        return repoProblem;
    }
View Full Code Here

        repoProblemDao = dao.getRepositoryProblemDAO();
    }

    public RepositoryProblem createRepoProblem( String groupId, String repoId )
    {
        RepositoryProblem repoProblem = new RepositoryProblem();

        repoProblem.setGroupId( groupId );
        repoProblem.setArtifactId( "artifactId" );
        repoProblem.setMessage( "message" );
        repoProblem.setOrigin( "origin" );
        repoProblem.setPath( "path" );
        repoProblem.setRepositoryId( repoId );
        repoProblem.setType( "type" );
        repoProblem.setVersion( "version" );

        return repoProblem;
    }
View Full Code Here

    }

    public void testHealthReportSingleRepo()
        throws Exception
    {
        RepositoryProblem problem1 = createProblem( GROUP_ID, "artifactId", INTERNAL );
        RepositoryProblem problem2 = createProblem( GROUP_ID, "artifactId-2", INTERNAL );
        repositoryProblemDAOControl.expectAndReturn( repositoryProblemDAO.queryRepositoryProblems(
            new RepositoryProblemByRepositoryIdConstraint( new int[]{0, 101}, INTERNAL ) ),
                                                     Arrays.asList( problem1, problem2 ) );
        repositoryProblemDAOControl.replay();
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.model.RepositoryProblem

Copyright © 2018 www.massapicom. 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.