maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r467769 - /maven/shared/trunk/maven-verifier/src/main/java/org/apache/maven/it/Verifier.java
Date Wed, 25 Oct 2006 21:13:43 GMT
Author: jvanzyl
Date: Wed Oct 25 14:13:42 2006
New Revision: 467769

URL: http://svn.apache.org/viewvc?view=rev&rev=467769
Log:
o add some methods to push envVars into the execution

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?view=diff&rev=467769&r1=467768&r2=467769
==============================================================================
--- 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 Wed
Oct 25 14:13:42 2006
@@ -753,10 +753,22 @@
     public void executeGoal( String goal )
         throws VerificationException
     {
+        executeGoal( goal, Collections.EMPTY_MAP );
+    }
+
+    public void executeGoal( String goal, Map envVars )
+        throws VerificationException
+    {
         executeGoals( Arrays.asList( new String[]{goal} ) );
     }
 
-    public void executeGoals( List goals )
+    public void executeGoals( List goals  )
+        throws VerificationException
+    {
+        executeGoals( goals, Collections.EMPTY_MAP );
+    }
+
+    public void executeGoals( List goals, Map envVars )
         throws VerificationException
     {
         String mavenHome = System.getProperty( "maven.home" );
@@ -777,6 +789,13 @@
         try
         {
             Commandline cli = new Commandline();
+
+            for ( Iterator i = envVars.keySet().iterator(); i.hasNext(); )
+            {
+                String key = (String) i.next();
+
+                cli.addEnvironment( key, (String) envVars.get( key ) );
+            }
 
             cli.setWorkingDirectory( basedir );
 



Mime
View raw message