Package org.apache.maven.settings

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


            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(); )
            {
                profile = it.next();
View Full Code Here


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

    public void testGetMavenProjectWithMaven3Metadata()
        throws Exception
View Full Code Here

            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(); )
            {
                profile = it.next();
View Full Code Here

    public void testShouldActivateNonExistantSettingsProfile()
        throws ProfileActivationException
    {
        // MNG-2234 - we should activate profiles that don't exist yet so that they can be defined by a POM.
        Settings settings = new Settings();
        settings.addActiveProfile( "testProfile" );

        ProfileManager profileManager = new DefaultProfileManager( getContainer(), settings );

        List activeIds = profileManager.getExplicitlyActivatedIds();
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.