openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1777169 - /openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java
Date Tue, 03 Jan 2017 17:18:48 GMT
Author: rmannibucau
Date: Tue Jan  3 17:18:48 2017
New Revision: 1777169

URL: http://svn.apache.org/viewvc?rev=1777169&view=rev
Log:
OWB-1167 enforce log4j2 to shutdown to avoid classnotfound issues

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java?rev=1777169&r1=1777168&r2=1777169&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-maven-plugin/src/main/java/org/apache/meecrowave/maven/MeecrowaveRunMojo.java
Tue Jan  3 17:18:48 2017
@@ -18,6 +18,7 @@
  */
 package org.apache.meecrowave.maven;
 
+import org.apache.logging.log4j.LogManager;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -257,6 +258,9 @@ public class MeecrowaveRunMojo extends A
     @Parameter(property = "meecrowave.scanning-package-exclude")
     private String scanningPackageExcludes;
 
+    @Parameter(property = "meecrowave.force-log4j2-shutdown", defaultValue = "true")
+    private boolean forceLog4j2Shutdown;
+
     @Override
     public void execute() throws MojoExecutionException, MojoFailureException {
         if (skip) {
@@ -286,6 +290,9 @@ public class MeecrowaveRunMojo extends A
                 new Scanner(System.in).next();
             }
         } finally {
+            if (forceLog4j2Shutdown) {
+                LogManager.shutdown();
+            }
             if (appLoader != loader) {
                 try {
                     URLClassLoader.class.cast(appLoader).close();



Mime
View raw message