public abstract class AbstractCodegenMoho
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected org.sonatype.plexus.build.incremental.BuildContext |
buildContext |
protected String |
classesDirectory |
protected boolean |
disableDependencyScan
By default all maven dependencies of type "wsdl" are added to the effective wsdlOptions.
|
protected boolean |
disableDirectoryScan
Disables the scanning of the wsdlRoot/testWsdlRoot directories.
|
protected String[] |
excludes
A list of wsdl files to exclude.
|
protected String |
fork
Allows running the JavaToWs in a separate process.
|
protected String[] |
includes
A list of wsdl files to include.
|
protected File |
markerDirectory
Directory in which the "DONE" markers are saved that
|
protected List<org.apache.maven.artifact.Artifact> |
pluginArtifacts
The plugin dependencies, needed for the fork mode
|
protected org.apache.maven.project.MavenProject |
project |
protected File |
testWsdlRoot |
protected boolean |
useCompileClasspath
Use the compile classpath rather than the test classpath for execution useful if the test dependencies
clash with those of wsdl2java
|
protected File |
wsdlRoot |
Constructor and Description |
---|
AbstractCodegenMoho() |
Modifier and Type | Method and Description |
---|---|
protected void |
addPluginArtifact(Set<URI> artifactsPath) |
protected void |
configureProxyServerSettings() |
protected void |
createMarkerFile(GenericWsdlOption wsdlOption,
File doneFile,
URI wsdlURI) |
protected abstract List<GenericWsdlOption> |
createWsdlOptionsFromScansAndExplicitWsdlOptions() |
protected boolean |
deleteDir(File f)
Recursively delete the given directory
|
protected void |
downloadRemoteWsdls(List<GenericWsdlOption> effectiveWsdlOptions) |
void |
execute() |
protected void |
forkOnce(Set<URI> classPath,
List<GenericWsdlOption> effectiveWsdlOptions) |
protected abstract org.apache.cxf.Bus |
generate(GenericWsdlOption o,
org.apache.cxf.Bus bus,
Set<URI> cp) |
protected List<String> |
generateCommandLine(GenericWsdlOption wsdlOption) |
protected File |
getDoneFile(URI basedir,
URI wsdlURI,
String mojo) |
protected abstract Class<?> |
getForkClass() |
protected abstract File |
getGeneratedSourceRoot() |
protected abstract File |
getGeneratedTestRoot() |
protected abstract String |
getMarkerSuffix() |
File |
getWsdlFile(GenericWsdlOption option,
File baseDir)
Try to find a file matching the wsdl path (either absolutely, relatively to the current dir or to
the project base dir)
|
URI |
getWsdlURI(GenericWsdlOption option,
URI baseURI) |
protected void |
runForked(Set<URI> classPath,
String mainClassName,
String[] args) |
protected abstract boolean |
shouldRun(GenericWsdlOption wsdlOption,
File doneFile,
URI wsdlURI)
Determine if code should be generated from the given wsdl
|
@Parameter(property="project.build.outputDirectory", required=true) protected String classesDirectory
@Parameter(property="cxf.disableDependencyScan", defaultValue="false") protected boolean disableDependencyScan
@Parameter(property="cxf.disableDirectoryScan", defaultValue="false") protected boolean disableDirectoryScan
@Parameter(defaultValue="false") protected String fork
@Parameter protected String[] includes
@Parameter(property="cxf.markerDirectory", defaultValue="${project.build.directory}/cxf-codegen-plugin-markers") protected File markerDirectory
@Parameter(required=true, readonly=true, property="plugin.artifacts") protected List<org.apache.maven.artifact.Artifact> pluginArtifacts
@Parameter(required=true, property="project") protected org.apache.maven.project.MavenProject project
@Parameter(property="cxf.useCompileClasspath", defaultValue="false") protected boolean useCompileClasspath
@Parameter protected String[] excludes
@Parameter(property="cxf.testWsdlRoot", defaultValue="${basedir}/src/test/resources/wsdl") protected File testWsdlRoot
@Parameter(property="cxf.wsdlRoot", defaultValue="${basedir}/src/main/resources/wsdl") protected File wsdlRoot
@Component protected org.sonatype.plexus.build.incremental.BuildContext buildContext
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected abstract org.apache.cxf.Bus generate(GenericWsdlOption o, org.apache.cxf.Bus bus, Set<URI> cp) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void configureProxyServerSettings() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected abstract List<GenericWsdlOption> createWsdlOptionsFromScansAndExplicitWsdlOptions() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected boolean deleteDir(File f)
f
- protected abstract String getMarkerSuffix()
protected List<String> generateCommandLine(GenericWsdlOption wsdlOption) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void forkOnce(Set<URI> classPath, List<GenericWsdlOption> effectiveWsdlOptions) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected abstract Class<?> getForkClass()
protected abstract File getGeneratedSourceRoot()
protected abstract File getGeneratedTestRoot()
protected void runForked(Set<URI> classPath, String mainClassName, String[] args) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected abstract boolean shouldRun(GenericWsdlOption wsdlOption, File doneFile, URI wsdlURI)
wsdlOption
- doneFile
- wsdlURI
- protected void createMarkerFile(GenericWsdlOption wsdlOption, File doneFile, URI wsdlURI) throws IOException
IOException
public File getWsdlFile(GenericWsdlOption option, File baseDir)
public URI getWsdlURI(GenericWsdlOption option, URI baseURI) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void downloadRemoteWsdls(List<GenericWsdlOption> effectiveWsdlOptions) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
Apache CXF