Author: brett
Date: Thu Feb 26 11:57:19 2009
New Revision: 748104

URL: http://svn.apache.org/viewvc?rev=748104&view=rev
Log:
[MNG-3641] Lack of error checks on profiles
Submitted by: Torben S. Giesselmann
Merged from: r748102

Modified:
    maven/components/branches/maven-2.0.x/   (props changed)
    maven/components/branches/maven-2.0.x/apache-maven/   (props changed)
    maven/components/branches/maven-2.0.x/apache-maven/src/test/   (props 
changed)
    maven/components/branches/maven-2.0.x/maven-integration-tests/   (props 
changed)
    maven/components/branches/maven-2.0.x/maven-model/src/test/   (props 
changed)
    
maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Propchange: maven/components/branches/maven-2.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 11:57:19 2009
@@ -1,3 +1,3 @@
 /maven/components/branches/maven-2.0.10-RC:708790-728809,728834
-/maven/components/branches/maven-2.1.x:720038,727670,727762,727868,728933,728937,737683,738723,738753,739385,741507,741518,741870,742819,744645,745836,747468,747683,747799
+/maven/components/branches/maven-2.1.x:720038,727670,727762,727868,728933,728937,737683,738723,738753,739385,741507,741518,741870,742819,744645,745836,747468,747683,747799,748102
 /maven/components/trunk:720001,721902,726845,729292

Propchange: maven/components/branches/maven-2.0.x/apache-maven/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 11:57:19 2009
@@ -1,5 +1,5 @@
 /maven/components/branches/maven-2.0.10-RC/apache-maven:708790-728809,728834
 
/maven/components/branches/maven-2.0.x/apache-maven:533160,636838,645583,645642,647357,649903,657432,659677,662033,662251,669665,670358,673499,673905,674059,675074,675087,675096,675375,675380,680604,682055
-/maven/components/branches/maven-2.1.x/apache-maven:720038,728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799
+/maven/components/branches/maven-2.1.x/apache-maven:720038,728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102
 /maven/components/trunk/apache-maven:720001,721902,726845
 /maven/components/trunk/maven-distribution:727688

Propchange: maven/components/branches/maven-2.0.x/apache-maven/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 11:57:19 2009
@@ -1,2 +1,2 @@
 
/maven/components/branches/maven-2.0.10-RC/apache-maven/src/test:727009-728809,728834
-/maven/components/branches/maven-2.1.x/apache-maven/src/test:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799
+/maven/components/branches/maven-2.1.x/apache-maven/src/test:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102

Propchange: maven/components/branches/maven-2.0.x/maven-integration-tests/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 11:57:19 2009
@@ -1,2 +1,2 @@
 
/maven/components/branches/maven-2.0.10-RC/maven-integration-tests:709246-728809,728834
-/maven/components/branches/maven-2.1.x/maven-integration-tests:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799
+/maven/components/branches/maven-2.1.x/maven-integration-tests:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102

Propchange: maven/components/branches/maven-2.0.x/maven-model/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 26 11:57:19 2009
@@ -1,2 +1,2 @@
 
/maven/components/branches/maven-2.0.10-RC/maven-model/src/test:727009-728809,728834
-/maven/components/branches/maven-2.1.x/maven-model/src/test:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799
+/maven/components/branches/maven-2.1.x/maven-model/src/test:728933,728937,737683,738723,738753,741507,741518,742819,745836,747683,747799,748102

Modified: 
maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=748104&r1=748103&r2=748104&view=diff
==============================================================================
--- 
maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 (original)
+++ 
maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
 Thu Feb 26 11:57:19 2009
@@ -985,6 +985,34 @@
         // We don't need all the project methods that are added over those in 
the model, but we do need basedir
         Map context = new HashMap();
 
+        // 
--------------------------------------------------------------------------------
+        // MNG-3641: print a warning if one of the profiles to be activated 
explicitly
+        // was not activated
+
+        if ( config != null && config.getGlobalProfileManager() != null )
+        {
+            // get all activated profile ids
+            List activeProfileIds = new ArrayList();
+
+            for ( Iterator it = activeProfiles.iterator(); it.hasNext(); )
+            {
+                activeProfileIds.add( ( (Profile) it.next() ).getId() );
+            }
+
+            for ( Iterator it = 
config.getGlobalProfileManager().getExplicitlyActivatedIds().iterator(); 
it.hasNext(); )
+            {
+                String explicitProfileId = (String) it.next();
+
+                if ( !activeProfileIds.contains( explicitProfileId ) )
+                {
+                    getLogger().warn( "Profile with id: \'" + 
explicitProfileId + "\' has not been activated." );
+                }
+
+            }
+        }
+        
+        // 
--------------------------------------------------------------------------------
+        
         Build build = model.getBuild();
 
         if ( projectDir != null )


Reply via email to