Package org.apache.maven.continuum.project.builder

Examples of org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult


    {
        File pom = getTestFile( pomResource );

        assertNotNull( "Can't find project " + pomResource, pom );

        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( pom.toURL(), null, null );

        // some assertions to make sure our expectations match. This is NOT
        // meant as a unit test for the projectbuilder!

        assertNotNull( "Project list not null", result.getProjects() );

        assertEquals( "#Projectgroups", 1, result.getProjectGroups().size() );

        ProjectGroup pg = result.getProjectGroups().get( 0 );

        // If the next part fails, remove this code! Then result.getProjects
        // might be empty, and result.projectgroups[0].getProjects contains
        // the single project!

        assertEquals( "#Projects in result", 1, result.getProjects().size() );

        Project p = result.getProjects().get( 0 );

        pg.addProject( p );

        p.setWorkingDirectory( pom.getParent() );
View Full Code Here


    public void testGetMavenProjectWithMaven3Metadata()
        throws Exception
    {
        File pomFile = getTestFile( "src/test/test-projects/maven3-metadata/pom.xml" );
        MavenProject project = helper.getMavenProject( new ContinuumProjectBuildingResult(), pomFile );
        assertNotNull( project );
    }
View Full Code Here

                                            boolean checkoutInSingleDirectory )
        throws Exception
    {
        checkAddProjectAuthorization( projectGroupId );

        ContinuumProjectBuildingResult result;
        try
        {
            result = continuum.addMavenTwoProject( url, projectGroupId, checkProtocol, useCredentialsCache,
                                                   recursiveProjects,
                                                   continuum.getBuildDefinitionService().getDefaultMavenTwoBuildDefinitionTemplate().getId(),
View Full Code Here

    public AddingResult addMavenOneProject( String url, int projectGroupId )
        throws ContinuumException
    {
        checkAddProjectAuthorization( projectGroupId );

        ContinuumProjectBuildingResult result = continuum.addMavenOneProject( url, projectGroupId );
        return populateAddingResult( result );
    }
View Full Code Here

    public AddingResult addMavenTwoProject( String url )
        throws ContinuumException
    {
        checkAddProjectGroupAuthorization();

        ContinuumProjectBuildingResult result = continuum.addMavenTwoProject( url );
        return populateAddingResult( result );
    }
View Full Code Here

    public AddingResult addMavenTwoProject( String url, int projectGroupId )
        throws ContinuumException
    {
        checkAddProjectAuthorization( projectGroupId );

        ContinuumProjectBuildingResult result = continuum.addMavenTwoProject( url, projectGroupId );
        return populateAddingResult( result );
    }
View Full Code Here

    public AddingResult addMavenTwoProject( String url, int projectGroupId, boolean checkoutInSingleDirectory )
        throws ContinuumException
    {
        checkAddProjectAuthorization( projectGroupId );

        ContinuumProjectBuildingResult result;
        try
        {
            result = continuum.addMavenTwoProject( url, projectGroupId, true, // checkProtocol
                                                   false, // useCredentialsCache
                                                   true, // recursiveProjects
View Full Code Here

    public AddingResult addMavenTwoProjectAsSingleProject( String url, int projectGroupId )
        throws Exception
    {
        checkAddProjectAuthorization( projectGroupId );

        ContinuumProjectBuildingResult result;
        try
        {
            result = continuum.addMavenTwoProject( url, projectGroupId, true, // checkProtocol
                                                   false, // useCredentialsCache
                                                   false, // recursiveProjects
View Full Code Here

    {
        File pom = getTestFile( pomResource );

        assertNotNull( "Can't find project " + pomResource, pom );

        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( pom.toURL(), null, null );

        // some assertions to make sure our expectations match. This is NOT
        // meant as a unit test for the projectbuilder!

        assertNotNull( "Project list not null", result.getProjects() );

        assertEquals( "#Projectgroups", 1, result.getProjectGroups().size() );

        ProjectGroup pg = (ProjectGroup) result.getProjectGroups().get( 0 );

        // If the next part fails, remove this code! Then result.getProjects
        // might be empty, and result.projectgroups[0].getProjects contains
        // the single project!

        assertEquals( "#Projects in result", 1, result.getProjects().size() );

        Project p = (Project) result.getProjects().get( 0 );

        pg.addProject( p );

        p.setWorkingDirectory( pom.getParent() );
View Full Code Here

        ContinuumProjectBuilder projectBuilder =
            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );

        File pom = getTestFile( "src/test/repository/maven-builder-helper-1.xml" );

        ContinuumProjectBuildingResult result = projectBuilder.buildProjectsFromMetadata( pom.toURL(), null, null );

        assertNotNull( result.getErrors() );

        assertEquals( 0, result.getErrors().size() );

        assertNotNull( result.getProjects() );

        assertEquals( 1, result.getProjects().size() );

        Project project = (Project) result.getProjects().get( 0 );

        assertNotNull( project );

        assertNotNull( project.getNotifiers() );

        assertEquals( 1, project.getNotifiers().size() );

        ProjectNotifier notifier = (ProjectNotifier) project.getNotifiers().get( 0 );

        assertEquals( "mail", notifier.getType() );

        assertEquals( "foo@bar", notifier.getConfiguration().get( "address" ) );

        ProjectGroup pg = (ProjectGroup) result.getProjectGroups().get( 0 );

        assertNotNull( pg );

        assertNotNull( pg.getNotifiers() );
View Full Code Here

TOP

Related Classes of org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult

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.