use of org.apache.cxf.maven_plugin.common.DocumentArtifact in project cxf by apache.
the class AbstractCodeGeneratorMojo method downloadRemoteDocs.
protected void downloadRemoteDocs(List<WadlOption> effectiveOptions) throws MojoExecutionException {
for (WadlOption option : effectiveOptions) {
DocumentArtifact wadlA = option.getWadlArtifact();
if (wadlA == null) {
return;
}
Artifact wadlArtifact = repositorySystem.createArtifact(wadlA.getGroupId(), wadlA.getArtifactId(), wadlA.getVersion(), wadlA.getType());
wadlArtifact = resolveRemoteWadlArtifact(wadlArtifact);
if (wadlArtifact != null) {
String path = wadlArtifact.getFile().getAbsolutePath();
getLog().info("Resolved WADL artifact to file " + path);
option.setWadl(path);
}
}
}
use of org.apache.cxf.maven_plugin.common.DocumentArtifact in project cxf by apache.
the class OptionLoader method generateWsdlOptionFromArtifact.
private static WadlOption generateWsdlOptionFromArtifact(Artifact artifact, File outputDir) {
if (!WADL_TYPE.equals(artifact.getType())) {
return null;
}
WadlOption option = new WadlOption();
DocumentArtifact wsdlArtifact = new DocumentArtifact();
wsdlArtifact.setArtifactId(artifact.getArtifactId());
wsdlArtifact.setGroupId(artifact.getGroupId());
wsdlArtifact.setType(artifact.getType());
wsdlArtifact.setVersion(artifact.getVersion());
option.setWadlArtifact(wsdlArtifact);
option.setOutputDir(outputDir);
return option;
}
Aggregations