[cxf] branch master updated: [CXF-7967] Ability to skip the garbage collection in wsdl2java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[cxf] branch master updated: [CXF-7967] Ability to skip the garbage collection in wsdl2java

Guillaume Nodet-2
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 8edf8f6  [CXF-7967] Ability to skip the garbage collection in wsdl2java
8edf8f6 is described below

commit 8edf8f6584865ab29dfb01382f7198e0af8a129e
Author: Guillaume Nodet <[hidden email]>
AuthorDate: Fri Feb 8 14:45:55 2019 +0100

    [CXF-7967] Ability to skip the garbage collection in wsdl2java
---
 .../main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
index fd44b6d..7cba697 100644
--- a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
+++ b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
@@ -164,6 +164,9 @@ public abstract class AbstractCodegenMoho extends AbstractMojo {
     @Parameter(property = "cxf.wsdlRoot", defaultValue = "${basedir}/src/main/resources/wsdl")
     protected File wsdlRoot;
 
+    @Parameter(property = "cxf.skipGarbageCollection", defaultValue = "false")
+    protected boolean skipGarbageCollection;
+
     @Component
     protected BuildContext buildContext;
 
@@ -303,7 +306,9 @@ public abstract class AbstractCodegenMoho extends AbstractMojo {
         if (project != null && getGeneratedTestRoot() != null && getGeneratedTestRoot().exists()) {
             buildContext.refresh(getGeneratedTestRoot().getAbsoluteFile());
         }
-        System.gc();
+        if (!skipGarbageCollection) {
+            System.gc();
+        }
     }
 
     private void checkResources() {