ProcMode () { Element compilerConfiguration = getPluginExecutionConfiguration("org.apache.maven.plugins", "maven-compiler-plugin", "default-compile"); if (compilerConfiguration == null) { compilerConfiguration = getCompilerConfig(); } if (compilerConfiguration == null) { return ProcMode.BOTH; } Element procElement = compilerConfiguration.getChild("proc"); if (procElement != null) { String procMode = procElement.getValue(); return ("only".equalsIgnoreCase(procMode)) ? ProcMode.ONLY : ("none".equalsIgnoreCase(procMode)) ? ProcMode.NONE : ProcMode.BOTH; } String compilerArgument = compilerConfiguration.getChildTextTrim("compilerArgument"); if ("-proc:none".equals(compilerArgument)) { return ProcMode.NONE; } if ("-proc:only".equals(compilerArgument)) { return ProcMode.ONLY; } Element compilerArguments = compilerConfiguration.getChild("compilerArgs"); if (compilerArguments != null) { for (Element element : compilerArguments.getChildren()) { String arg = element.getValue(); if ("-proc:none".equals(arg)) { return ProcMode.NONE; } if ("-proc:only".equals(arg)) { return ProcMode.ONLY; } } } return ProcMode.BOTH; }