maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r912161 - /maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java
Date Sat, 20 Feb 2010 17:46:18 GMT
Author: bentmann
Date: Sat Feb 20 17:46:18 2010
New Revision: 912161

URL: http://svn.apache.org/viewvc?rev=912161&view=rev
Log:
o Simplified configuration of environment variables

Modified:
    maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java

Modified: maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java?rev=912161&r1=912160&r2=912161&view=diff
==============================================================================
--- maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java (original)
+++ maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java Sat
Feb 20 17:46:18 2010
@@ -91,6 +91,8 @@
 
     private Properties systemProperties = new Properties();
 
+    private Properties environmentVariables = new Properties();
+
     private Properties verifierProperties = new Properties();
 
     private boolean autoclean = true;
@@ -1155,7 +1157,7 @@
     public void executeGoal( String goal )
         throws VerificationException
     {
-        executeGoal( goal, Collections.EMPTY_MAP );
+        executeGoal( goal, environmentVariables );
     }
 
     public void executeGoal( String goal, Map envVars )
@@ -1167,7 +1169,7 @@
     public void executeGoals( List goals )
         throws VerificationException
     {
-        executeGoals( goals, Collections.EMPTY_MAP );
+        executeGoals( goals, environmentVariables );
     }
 
     public String getExecutable()
@@ -1867,6 +1869,28 @@
         }
     }
 
+    public Properties getEnvironmentVariables()
+    {
+        return environmentVariables;
+    }
+
+    public void setEnvironmentVariables( Properties environmentVariables )
+    {
+        this.environmentVariables = environmentVariables;
+    }
+
+    public void setEnvironmentVariable( String key, String value )
+    {
+        if ( value != null )
+        {
+            environmentVariables.setProperty( key, value );
+        }
+        else
+        {
+            environmentVariables.remove( key );
+        }
+    }
+
     public Properties getVerifierProperties()
     {
         return verifierProperties;



Mime
View raw message