Author: olamy
Date: Mon Oct 17 14:02:26 2011
New Revision: 1185175

URL: http://svn.apache.org/viewvc?rev=1185175&view=rev
Log:
[MTOMCAT-102] correctly set sys props pass tru the cli

Modified:
    
tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java

Modified: 
tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java?rev=1185175&r1=1185174&r2=1185175&view=diff
==============================================================================
--- 
tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java
 (original)
+++ 
tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java
 Mon Oct 17 14:02:26 2011
@@ -29,6 +29,7 @@ import org.apache.commons.cli.ParseExcep
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.Map;
 import java.util.Properties;
 
 /**
@@ -142,6 +143,19 @@ public class Tomcat7RunnerCli
         {
             tomcat7Runner.debug = true;
         }
+
+        if ( line.hasOption( sysProps.getOpt() ) )
+        {
+            Properties systemProperties = line.getOptionProperties( 
sysProps.getOpt() );
+            if ( systemProperties != null && !systemProperties.isEmpty() )
+            {
+                for ( Map.Entry<Object, Object> sysProp : 
systemProperties.entrySet() )
+                {
+                    System.setProperty( (String) sysProp.getKey(), (String) 
sysProp.getValue() );
+                }
+            }
+        }
+
         // here we go
         tomcat7Runner.run();
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to