Class WSDL2JavaMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.cxf.maven_plugin.AbstractCodegenMojo
org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="wsdl2java",
defaultPhase=GENERATE_SOURCES,
threadSafe=true,
requiresDependencyResolution=TEST)
public class WSDL2JavaMojo
extends AbstractCodegenMojo
-
Field Summary
Fields inherited from class org.apache.cxf.maven_plugin.AbstractCodegenMojo
buildContext, classesDirectory, disableDependencyScan, disableDirectoryScan, excludes, fork, includes, markerDirectory, pluginArtifacts, project, skipGarbageCollection, testWsdlRoot, useCompileClasspath, wsdlRoot
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
createMarkerFile
(GenericWsdlOption wsdlOption, File doneFile, URI wsdlURI) protected List<GenericWsdlOption>
void
execute()
protected Bus
generate
(GenericWsdlOption genericWsdlOption, Bus bus, Set<URI> classPath) generateCommandLine
(GenericWsdlOption wsdlOption) protected URI
getBaseFileURI
(URI uri) Finds the base file URI that 'contains' the given URI.protected Class<?>
protected File
protected File
protected String
protected long
getTimestamp
(URI uri) Finds the timestamp for a given URI.protected void
mergeOptions
(List<GenericWsdlOption> effectiveWsdlOptions) Merge WsdlOptions that point to the same file by adding the extraargs to the first option and deleting the second from the options listprotected boolean
shouldRun
(GenericWsdlOption genericWsdlOption, File doneFile, URI wsdlURI) Determine if code should be generated from the given wsdlMethods inherited from class org.apache.cxf.maven_plugin.AbstractCodegenMojo
addPluginArtifact, configureProxyServerSettings, deleteDir, downloadRemoteWsdls, forkOnce, getDoneFile, getWsdlFile, getWsdlURI, runForked
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
WSDL2JavaMojo
public WSDL2JavaMojo()
-
-
Method Details
-
mergeOptions
Merge WsdlOptions that point to the same file by adding the extraargs to the first option and deleting the second from the options list- Parameters:
effectiveWsdlOptions
-
-
shouldRun
Determine if code should be generated from the given wsdl- Specified by:
shouldRun
in classAbstractCodegenMojo
- Parameters:
genericWsdlOption
-doneFile
-wsdlURI
-- Returns:
-
createMarkerFile
protected void createMarkerFile(GenericWsdlOption wsdlOption, File doneFile, URI wsdlURI) throws IOException - Overrides:
createMarkerFile
in classAbstractCodegenMojo
- Throws:
IOException
-
getTimestamp
Finds the timestamp for a given URI. CallsgetBaseFileURI(URI)
prior to the timestamp check in order to handle "classpath" and "jar" URIs.- Parameters:
uri
- the URI to timestamp- Returns:
- a timestamp
-
getBaseFileURI
Finds the base file URI that 'contains' the given URI. If the URI can not be resolved to a file URI then the original URI is returned. This method currently attempts to resolve only "classpath" and "jar" URIs.- Parameters:
uri
- the URI to resolve- Returns:
- uri a file URI if the original URI is contained in a file, otherwise the original URI
-
generateCommandLine
protected List<String> generateCommandLine(GenericWsdlOption wsdlOption) throws org.apache.maven.plugin.MojoExecutionException - Overrides:
generateCommandLine
in classAbstractCodegenMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
generate
protected Bus generate(GenericWsdlOption genericWsdlOption, Bus bus, Set<URI> classPath) throws org.apache.maven.plugin.MojoExecutionException - Specified by:
generate
in classAbstractCodegenMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createWsdlOptionsFromScansAndExplicitWsdlOptions
protected List<GenericWsdlOption> createWsdlOptionsFromScansAndExplicitWsdlOptions() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
createWsdlOptionsFromScansAndExplicitWsdlOptions
in classAbstractCodegenMojo
- Returns:
- effective WsdlOptions
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getGeneratedSourceRoot
- Specified by:
getGeneratedSourceRoot
in classAbstractCodegenMojo
-
getGeneratedTestRoot
- Specified by:
getGeneratedTestRoot
in classAbstractCodegenMojo
-
getForkClass
- Specified by:
getForkClass
in classAbstractCodegenMojo
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Overrides:
execute
in classAbstractCodegenMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getMarkerSuffix
- Specified by:
getMarkerSuffix
in classAbstractCodegenMojo
-