Author: olamy
Date: Tue Apr  5 02:44:44 2016
New Revision: 1737760

URL: http://svn.apache.org/viewvc?rev=1737760&view=rev
Log:
[MTOMCAT-306]
Allow port reuse when invoking plugin repeatedly in build
fixes #17

Signed-off-by: olivier lamy <ol...@apache.org>

Modified:
    
tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java

Modified: 
tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java?rev=1737760&r1=1737759&r2=1737760&view=diff
==============================================================================
--- 
tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
 (original)
+++ 
tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/EmbeddedRegistry.java
 Tue Apr  5 02:44:44 2016
@@ -108,6 +108,7 @@ public final class EmbeddedRegistry
             {
                 Method method = embedded.getClass().getMethod( "stop", null );
                 method.invoke( embedded, null );
+                embedded.getClass().getMethod( "destroy", null ).invoke( 
embedded, null );
                 iterator.remove();
             }
             catch ( NoSuchMethodException e )
@@ -115,7 +116,7 @@ public final class EmbeddedRegistry
                 if ( firstException == null )
                 {
                     firstException = e;
-                    error( log, e, "no stop method in class " + 
embedded.getClass().getName() );
+                    error( log, e, "no stop/destroy method in class " + 
embedded.getClass().getName() );
                 }
                 else
                 {
@@ -127,7 +128,7 @@ public final class EmbeddedRegistry
                 if ( firstException == null )
                 {
                     firstException = e;
-                    error( log, e, "IllegalAccessException for stop method in 
class " + embedded.getClass().getName() );
+                    error( log, e, "IllegalAccessException for stop/destroy 
method in class " + embedded.getClass().getName() );
                 }
                 else
                 {
@@ -140,7 +141,7 @@ public final class EmbeddedRegistry
                 if ( firstException == null )
                 {
                     firstException = e;
-                    error( log, e, "IllegalAccessException for stop method in 
class " + embedded.getClass().getName() );
+                    error( log, e, "IllegalAccessException for stop/destroy 
method in class " + embedded.getClass().getName() );
                 }
                 else
                 {



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

Reply via email to