Author: brett
Date: Thu Jan 29 02:43:38 2009
New Revision: 738723
URL: http://svn.apache.org/viewvc?rev=738723&view=rev
Log:
[MNG-3810] improve error message when you forget to add a required field in
model that modello isn't picking up
Modified:
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
Modified:
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
URL:
http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java?rev=738723&r1=738722&r2=738723&view=diff
==============================================================================
---
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
(original)
+++
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
Thu Jan 29 02:43:38 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.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
URL:
http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java?rev=738723&r1=738722&r2=738723&view=diff
==============================================================================
---
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
(original)
+++
maven/components/branches/maven-2.1.x/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
Thu Jan 29 02:43:38 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;