maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r594301 - /maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
Date Mon, 12 Nov 2007 21:17:29 GMT
Author: jdcasey
Date: Mon Nov 12 13:17:29 2007
New Revision: 594301

URL: http://svn.apache.org/viewvc?rev=594301&view=rev
Log:
Adding a check to use sysprops if nothing else is set in the embedder configuration or request.

Modified:
    maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java

Modified: maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java?rev=594301&r1=594300&r2=594301&view=diff
==============================================================================
--- maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
(original)
+++ maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
Mon Nov 12 13:17:29 2007
@@ -60,6 +60,7 @@
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Properties;
 
 /**
  * Things that we deal with in this populator to ensure that we have a valid {@MavenExecutionRequest}
@@ -94,6 +95,8 @@
                                                    Configuration configuration )
         throws MavenEmbedderException
     {
+        executionProperties( request, configuration );
+
         pom( request, configuration );
 
         settings( request, configuration );
@@ -117,6 +120,21 @@
         realmManager( request, configuration );
 
         return request;
+    }
+
+    private void executionProperties( MavenExecutionRequest request,
+                                      Configuration configuration )
+    {
+        if ( request.getProperties() == null )
+        {
+            Properties props = configuration.getSystemProperties();
+            if ( props == null )
+            {
+                props = System.getProperties();
+            }
+
+            request.setProperties( props );
+        }
     }
 
     private void realmManager( MavenExecutionRequest request,



Mime
View raw message