Examples of addProfile()


Examples of org.apache.maven.project.DefaultProjectBuildingRequest.addProfile()

        ProjectBuildingRequest config = new DefaultProjectBuildingRequest();

        for ( org.apache.maven.settings.Profile rawProfile : settings.getProfiles() )
        {
            Profile profile = SettingsUtils.convertFromSettingsProfile( rawProfile );
            config.addProfile( profile );
        }

        String localRepoUrl =
            System.getProperty( "maven.repo.local", System.getProperty( "user.home" ) + "/.m2/repository" );
        localRepoUrl = "file://" + localRepoUrl;
View Full Code Here

Examples of org.apache.maven.project.ProjectBuildingRequest.addProfile()

        ProjectBuildingRequest config = new DefaultProjectBuildingRequest();

        for ( org.apache.maven.settings.Profile rawProfile : settings.getProfiles() )
        {
            Profile profile = SettingsUtils.convertFromSettingsProfile( rawProfile );
            config.addProfile( profile );
        }

        String localRepoUrl =
            System.getProperty( "maven.repo.local", System.getProperty( "user.home" ) + "/.m2/repository" );
        localRepoUrl = "file://" + localRepoUrl;
View Full Code Here

Examples of org.apache.maven.project.ProjectBuildingRequest.addProfile()

        ProjectBuildingRequest config = new DefaultProjectBuildingRequest();

        for ( org.apache.maven.settings.Profile rawProfile : settings.getProfiles() )
        {
            Profile profile = SettingsUtils.convertFromSettingsProfile( rawProfile );
            config.addProfile( profile );
        }

        String localRepoUrl =
            System.getProperty( "maven.repo.local", System.getProperty( "user.home" ) + "/.m2/repository" );
        localRepoUrl = "file://" + localRepoUrl;
View Full Code Here

Examples of org.apache.maven.settings.Settings.addProfile()

            repository.setLayout( "default" );
            repository.setName( "Original Local Repository" );
            repository.setUrl( toUrl( localRepo ) );
            profile.addPluginRepository( repository );
            profile.addRepository( repository );
            settings.addProfile( profile );
            settings.addActiveProfile( profile.getId() );
            settings.setLocalRepository( stagedLocalRepo.getAbsolutePath() );

            for ( Iterator<Profile> it = settings.getProfiles().iterator(); it.hasNext(); )
            {
View Full Code Here

Examples of org.apache.maven.settings.Settings.addProfile()

        RepositoryPolicy policy = new RepositoryPolicy();
        policy.setEnabled( true );
        policy.setUpdatePolicy( "always" );
        repository.setSnapshots( policy );
        profile.addRepository( repository );
        settings.addProfile( profile );
        settings.addActiveProfile( "repo" );
        return settings;
    }

    public void testGetMavenProjectWithMaven3Metadata()
View Full Code Here

Examples of org.apache.maven.settings.Settings.addProfile()

            repository.setLayout( "default" );
            repository.setName( "Original Local Repository" );
            repository.setUrl( toUrl( localRepo ) );
            profile.addPluginRepository( repository );
            profile.addRepository( repository );
            settings.addProfile( profile );
            settings.addActiveProfile( profile.getId() );
            settings.setLocalRepository( stagedLocalRepo.getAbsolutePath() );

            for ( Iterator<Profile> it = settings.getProfiles().iterator(); it.hasNext(); )
            {
View Full Code Here

Examples of org.apache.maven.settings.Settings.addProfile()

    public void testValidate()
    {
        Settings model = new Settings();
        Profile prof = new Profile();
        prof.setId( "xxx" );
        model.addProfile( prof );
        SimpleProblemCollector problems = new SimpleProblemCollector();
        validator.validate( model, problems );
        assertEquals( 0, problems.messages.size() );

        Repository repo = new Repository();
View Full Code Here

Examples of org.apache.maven.settings.Settings.addProfile()

        repo = new Repository();
        repo.setId( "illegal\\:/chars" );
        repo.setUrl( "http://void" );
        profile.addRepository( repo );
        Settings settings = new Settings();
        settings.addProfile( profile );

        SimpleProblemCollector problems = new SimpleProblemCollector();
        validator.validate( settings, problems );
        assertEquals( 3, problems.messages.size() );
        assertContains( problems.messages.get( 0 ),
View Full Code Here

Examples of org.apache.maven.settings.Settings.addProfile()

        throws Exception
    {
        Settings settings = new Settings();
        Profile profile1 = new Profile();
        profile1.setId( "test" );
        settings.addProfile( profile1 );
        Profile profile2 = new Profile();
        profile2.setId( "test" );
        settings.addProfile( profile2 );

        SimpleProblemCollector problems = new SimpleProblemCollector();
View Full Code Here

Examples of org.apache.maven.settings.Settings.addProfile()

        Profile profile1 = new Profile();
        profile1.setId( "test" );
        settings.addProfile( profile1 );
        Profile profile2 = new Profile();
        profile2.setId( "test" );
        settings.addProfile( profile2 );

        SimpleProblemCollector problems = new SimpleProblemCollector();
        validator.validate( settings, problems );
        assertEquals( 1, problems.messages.size() );
        assertContains( problems.messages.get( 0 ),
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.