use of org.apache.cxf.maven_plugin.GenericWsdlOption in project cxf by apache.
the class WSDL2JavaScriptMojo method createWsdlOptionsFromScansAndExplicitWsdlOptions.
@Override
protected List<GenericWsdlOption> createWsdlOptionsFromScansAndExplicitWsdlOptions() throws MojoExecutionException {
List<GenericWsdlOption> effectiveWsdlOptions = new ArrayList<>();
List<GenericWsdlOption> temp;
if (wsdlOptions != null) {
for (WsdlOption wo : wsdlOptions) {
effectiveWsdlOptions.add(wo);
}
}
if (wsdlRoot != null && wsdlRoot.exists() && !disableDirectoryScan) {
temp = loadWsdlOptionsFromFiles(wsdlRoot, getGeneratedSourceRoot());
effectiveWsdlOptions.addAll(temp);
}
if (testWsdlRoot != null && testWsdlRoot.exists() && !disableDirectoryScan) {
temp = loadWsdlOptionsFromFiles(testWsdlRoot, getGeneratedTestRoot());
effectiveWsdlOptions.addAll(temp);
}
if (!disableDependencyScan) {
temp = loadWsdlOptionsFromDependencies(project, defaultOptions, getGeneratedSourceRoot());
effectiveWsdlOptions.addAll(temp);
}
mergeOptions(effectiveWsdlOptions);
downloadRemoteWsdls(effectiveWsdlOptions);
return effectiveWsdlOptions;
}
use of org.apache.cxf.maven_plugin.GenericWsdlOption in project cxf by apache.
the class WSDL2JavaScriptMojo method mergeOptions.
protected void mergeOptions(List<GenericWsdlOption> effectiveWsdlOptions) {
File outputDirFile = getGeneratedTestRoot() == null ? getGeneratedSourceRoot() : getGeneratedTestRoot();
for (GenericWsdlOption wo : effectiveWsdlOptions) {
WsdlOption option = (WsdlOption) wo;
option.merge(defaultOptions);
if (option.getOutput() == null) {
option.setOutput(outputDirFile);
}
}
}
Aggregations