Ability to skip the garbage collection in wsdl2java
@@ -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,8 +306,10 @@ public abstract class AbstractCodegenMoho extends AbstractMojo {
if (project != null && getGeneratedTestRoot() != null && getGeneratedTestRoot().exists()) {
buildContext.refresh(getGeneratedTestRoot().getAbsoluteFile());
}
+ if (!skipGarbageCollection) {
System.gc();
}
+ }
private void checkResources() {
File root = project.getBasedir();
