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, wsdlRootFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateMarkerFile(GenericWsdlOption wsdlOption, File doneFile, URI wsdlURI) protected List<GenericWsdlOption>voidexecute()protected Busgenerate(GenericWsdlOption genericWsdlOption, Bus bus, Set<URI> classPath) generateCommandLine(GenericWsdlOption wsdlOption) protected URIgetBaseFileURI(URI uri) Finds the base file URI that 'contains' the given URI.protected Class<?>protected Fileprotected Fileprotected Stringprotected longgetTimestamp(URI uri) Finds the timestamp for a given URI.protected voidmergeOptions(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 booleanshouldRun(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, runForkedMethods 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:
shouldRunin classAbstractCodegenMojo- Parameters:
genericWsdlOption-doneFile-wsdlURI-- Returns:
-
createMarkerFile
protected void createMarkerFile(GenericWsdlOption wsdlOption, File doneFile, URI wsdlURI) throws IOException - Overrides:
createMarkerFilein 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:
generateCommandLinein 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:
generatein classAbstractCodegenMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createWsdlOptionsFromScansAndExplicitWsdlOptions
protected List<GenericWsdlOption> createWsdlOptionsFromScansAndExplicitWsdlOptions() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
createWsdlOptionsFromScansAndExplicitWsdlOptionsin classAbstractCodegenMojo- Returns:
- effective WsdlOptions
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getGeneratedSourceRoot
- Specified by:
getGeneratedSourceRootin classAbstractCodegenMojo
-
getGeneratedTestRoot
- Specified by:
getGeneratedTestRootin classAbstractCodegenMojo
-
getForkClass
- Specified by:
getForkClassin classAbstractCodegenMojo
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractCodegenMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getMarkerSuffix
- Specified by:
getMarkerSuffixin classAbstractCodegenMojo
-