You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by si...@apache.org on 2009/02/28 18:44:51 UTC
svn commit: r748893 - in /maven/components/trunk/maven-project/src:
main/java/org/apache/maven/project/
test/java/org/apache/maven/profiles/manager/
Author: sisbell
Date: Sat Feb 28 17:44:51 2009
New Revision: 748893
URL: http://svn.apache.org/viewvc?rev=748893&view=rev
Log:
Removed deprecated methods and uses of ProfileManager.
Modified:
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultProfileManager.java
maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProfileManager.java
maven/components/trunk/maven-project/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java
Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultProfileManager.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultProfileManager.java?rev=748893&r1=748892&r2=748893&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultProfileManager.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultProfileManager.java Sat Feb 28 17:44:51 2009
@@ -129,66 +129,6 @@
}
}
- /* (non-Javadoc)
- * @see org.apache.maven.project.ProfileManager#explicitlyActivate(java.lang.String)
- */
- public void explicitlyActivate( String profileId )
- {
- List activatedIds = profileActivationContext.getExplicitlyActiveProfileIds();
- if ( !activatedIds.contains( profileId ) )
- {
- container.getLogger().debug( "Profile with id: \'" + profileId + "\' has been explicitly activated." );
-
- profileActivationContext.setActive( profileId );
- }
- }
-
- /* (non-Javadoc)
- * @see org.apache.maven.project.ProfileManager#explicitlyActivate(java.util.List)
- */
- public void explicitlyActivate( List profileIds )
- {
- for ( Iterator it = profileIds.iterator(); it.hasNext(); )
- {
- String profileId = (String) it.next();
-
- explicitlyActivate( profileId );
- }
- }
-
- /* (non-Javadoc)
- * @see org.apache.maven.project.ProfileManager#explicitlyDeactivate(java.lang.String)
- */
- public void explicitlyDeactivate( String profileId )
- {
- List deactivatedIds = profileActivationContext.getExplicitlyInactiveProfileIds();
- if ( !deactivatedIds.contains( profileId ) )
- {
- container.getLogger().debug( "Profile with id: \'" + profileId + "\' has been explicitly deactivated." );
-
- profileActivationContext.setInactive( profileId );
- }
- }
-
- /* (non-Javadoc)
- * @see org.apache.maven.project.ProfileManager#explicitlyDeactivate(java.util.List)
- */
- public void explicitlyDeactivate( List profileIds )
- {
- for ( Iterator it = profileIds.iterator(); it.hasNext(); )
- {
- String profileId = (String) it.next();
-
- explicitlyDeactivate( profileId );
- }
- }
-
- public List getActiveProfiles()
- throws ProfileActivationException
- {
- return getActiveProfiles( null );
- }
-
// TODO: Portions of this logic are duplicated in o.a.m.p.b.p.ProfileContext, something is wrong here
public List getActiveProfiles( Model model )
throws ProfileActivationException
@@ -344,7 +284,7 @@
/* (non-Javadoc)
* @see org.apache.maven.project.ProfileManager#addProfiles(java.util.List)
*/
- public void addProfiles( List profiles )
+ public void addProfiles( List<Profile> profiles )
{
for ( Iterator it = profiles.iterator(); it.hasNext(); )
{
@@ -354,7 +294,7 @@
}
}
- public void activateAsDefault( String profileId )
+ private void activateAsDefault( String profileId )
{
List defaultIds = profileActivationContext.getActiveByDefaultProfileIds();
@@ -364,21 +304,6 @@
}
}
- public List getExplicitlyActivatedIds()
- {
- return profileActivationContext.getExplicitlyActiveProfileIds();
- }
-
- public List getExplicitlyDeactivatedIds()
- {
- return profileActivationContext.getExplicitlyInactiveProfileIds();
- }
-
- public List getIdsActivatedByDefault()
- {
- return profileActivationContext.getActiveByDefaultProfileIds();
- }
-
public static String getGroupId( Model model )
{
Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProfileManager.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProfileManager.java?rev=748893&r1=748892&r2=748893&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProfileManager.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProfileManager.java Sat Feb 28 17:44:51 2009
@@ -31,60 +31,14 @@
{
void addProfile( Profile profile );
- /**
- * @deprecated Use {@link ProfileActivationContext} methods instead.
- */
- void explicitlyActivate( String profileId );
-
- /**
- * @deprecated Use {@link ProfileActivationContext} methods instead.
- */
- void explicitlyActivate( List profileIds );
-
- /**
- * @deprecated Use {@link ProfileActivationContext} methods instead.
- */
- void explicitlyDeactivate( String profileId );
-
- /**
- * @deprecated Use {@link ProfileActivationContext} methods instead.
- */
- void explicitlyDeactivate( List profileIds );
-
- /**
- * @deprecated Use {@link ProfileActivationContext} methods instead.
- */
- void activateAsDefault( String profileId );
-
ProfileActivationContext getProfileActivationContext();
void setProfileActivationContext( ProfileActivationContext profileActivationContext );
- /**
- * @deprecated Use {@link ProfileManager#getActiveProfiles(Model)} instead.
- */
- List getActiveProfiles()
- throws ProfileActivationException;
-
- void addProfiles( List profiles );
+ void addProfiles( List<Profile> profiles );
Map getProfilesById();
- /**
- * @deprecated Use {@link ProfileActivationContext} methods instead.
- */
- List getExplicitlyActivatedIds();
-
- /**
- * @deprecated Use {@link ProfileActivationContext} methods instead.
- */
- List getExplicitlyDeactivatedIds();
-
- /**
- * @deprecated Use {@link ProfileActivationContext} methods instead.
- */
- List getIdsActivatedByDefault();
-
List getActiveProfiles( Model model )
throws ProfileActivationException;
}
\ No newline at end of file
Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java?rev=748893&r1=748892&r2=748893&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java (original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/profiles/manager/DefaultProfileManagerTest.java Sat Feb 28 17:44:51 2009
@@ -70,7 +70,7 @@
profileManager.addProfile( notActivated );
profileManager.addProfile( defaultActivated );
- List active = profileManager.getActiveProfiles();
+ List active = profileManager.getActiveProfiles( null );
assertNotNull( active );
assertEquals( 1, active.size() );
@@ -109,7 +109,7 @@
profileManager.addProfile( syspropActivated );
profileManager.addProfile( defaultActivated );
- List active = profileManager.getActiveProfiles();
+ List active = profileManager.getActiveProfiles( null );
assertNotNull( active );
assertEquals( 1, active.size() );
@@ -138,7 +138,7 @@
profileManager.addProfile( syspropActivated );
- List active = profileManager.getActiveProfiles();
+ List active = profileManager.getActiveProfiles( null );
assertNotNull( active );
assertEquals( 0, active.size() );
@@ -166,9 +166,9 @@
profileManager.addProfile( syspropActivated );
- profileManager.explicitlyActivate( "syspropActivated" );
+ ctx.setActive( "syspropActivated" );
- List active = profileManager.getActiveProfiles();
+ List active = profileManager.getActiveProfiles( null );
assertNotNull( active );
assertEquals( 1, active.size() );
@@ -197,9 +197,9 @@
profileManager.addProfile( syspropActivated );
- profileManager.explicitlyDeactivate( "syspropActivated" );
+ ctx.setInactive( "syspropActivated" );
- List active = profileManager.getActiveProfiles();
+ List active = profileManager.getActiveProfiles( null );
assertNotNull( active );
assertEquals( 0, active.size() );
@@ -228,7 +228,7 @@
profileManager.addProfile( osActivated );
- List active = profileManager.getActiveProfiles();
+ List active = profileManager.getActiveProfiles( null );
assertNotNull( active );
assertEquals( 1, active.size() );