You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ol...@apache.org on 2013/01/30 11:17:37 UTC

svn commit: r1440331 - /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java

Author: olamy
Date: Wed Jan 30 10:17:37 2013
New Revision: 1440331

URL: http://svn.apache.org/viewvc?rev=1440331&view=rev
Log:
[MTOMCAT-61] maven tomcat:run ignores the useSeperateTomcatClassloaded when using serverXml property.

Modified:
    tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java

Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java
URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java?rev=1440331&r1=1440330&r2=1440331&view=diff
==============================================================================
--- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java (original)
+++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java Wed Jan 30 10:17:37 2013
@@ -920,6 +920,13 @@ public abstract class AbstractRunMojo
                 }
 
                 Catalina container = new Catalina();
+
+                if ( useSeparateTomcatClassLoader )
+                {
+                    Thread.currentThread().setContextClassLoader( getTomcatClassLoader() );
+                    container.setParentClassLoader( getTomcatClassLoader() );
+                }
+
                 container.setUseNaming( this.useNaming );
                 container.setConfig( serverXml.getAbsolutePath() );
                 container.start();



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