You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2009/01/29 03:45:54 UTC
svn commit: r738726 - in /maven/components/branches/maven-2.0.x: ./
apache-maven/ apache-maven/src/test/ maven-integration-tests/
maven-model/src/test/
maven-project/src/main/java/org/apache/maven/profiles/activation/
Author: brett
Date: Thu Jan 29 02:45:53 2009
New Revision: 738726
URL: http://svn.apache.org/viewvc?rev=738726&view=rev
Log:
[MNG-3810] improve error message when you forget to add a required field in model that modello isn't picking up
Merged from: r738723
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/profiles/activation/ProfileActivator.java
maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
Propchange: maven/components/branches/maven-2.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 29 02:45:53 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
+/maven/components/branches/maven-2.1.x:720038,727670,727762,727868,728933,728937,738723
/maven/components/trunk:720001,721902,726845,729292
Propchange: maven/components/branches/maven-2.0.x/apache-maven/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 29 02:45:53 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
+/maven/components/branches/maven-2.1.x/apache-maven:720038,728933,728937,738723
/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 Jan 29 02:45:53 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
+/maven/components/branches/maven-2.1.x/apache-maven/src/test:728933,728937,738723
Propchange: maven/components/branches/maven-2.0.x/maven-integration-tests/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 29 02:45:53 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
+/maven/components/branches/maven-2.1.x/maven-integration-tests:728933,728937,738723
Propchange: maven/components/branches/maven-2.0.x/maven-model/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 29 02:45:53 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
+/maven/components/branches/maven-2.1.x/maven-model/src/test:728933,728937,738723
Modified: maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java?rev=738726&r1=738725&r2=738726&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java Thu Jan 29 02:45:53 2009
@@ -27,6 +27,6 @@
boolean canDetermineActivation( Profile profile );
- boolean isActive( Profile profile );
-
+ boolean isActive( Profile profile )
+ throws ProfileActivationException;
}
Modified: maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java?rev=738726&r1=738725&r2=738726&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java (original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java Thu Jan 29 02:45:53 2009
@@ -44,6 +44,7 @@
}
public boolean isActive( Profile profile )
+ throws ProfileActivationException
{
Activation activation = profile.getActivation();
@@ -54,6 +55,12 @@
String name = property.getName();
boolean reverseName = false;
+ if ( name == null )
+ {
+ throw new ProfileActivationException( "The property name is required to activate the profile '"
+ + profile.getId() + "'" );
+ }
+
if ( name.startsWith("!") )
{
reverseName = true;