Apache CXF API

org.apache.cxf.maven_plugin.wsdl2java
Class WSDL2JavaMojo

java.lang.Object
  extended by AbstractMojo
      extended by org.apache.cxf.maven_plugin.AbstractCodegenMoho
          extended by org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo

public class WSDL2JavaMojo
extends AbstractCodegenMoho


Field Summary
 
Fields inherited from class org.apache.cxf.maven_plugin.AbstractCodegenMoho
buildContext, classesDirectory, disableDependencyScan, disableDirectoryScan, excludes, fork, includes, markerDirectory, pluginArtifacts, project, testWsdlRoot, useCompileClasspath, wsdlRoot
 
Constructor Summary
WSDL2JavaMojo()
           
 
Method Summary
protected  List<GenericWsdlOption> createWsdlOptionsFromScansAndExplicitWsdlOptions()
           
 void execute()
           
protected  Bus generate(GenericWsdlOption genericWsdlOption, Bus bus, Set<URI> classPath)
           
protected  List<String> generateCommandLine(GenericWsdlOption wsdlOption)
           
protected  URI getBaseFileURI(URI uri)
          Finds the base file URI that 'contains' the given URI.
protected  Class<?> getForkClass()
           
protected  File getGeneratedSourceRoot()
           
protected  File getGeneratedTestRoot()
           
protected  String getMarkerSuffix()
           
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 list
protected  boolean shouldRun(GenericWsdlOption genericWsdlOption, File doneFile, URI wsdlURI)
          Determine if code should be generated from the given wsdl
 
Methods inherited from class org.apache.cxf.maven_plugin.AbstractCodegenMoho
addPluginArtifact, configureProxyServerSettings, deleteDir, downloadRemoteWsdls, forkOnce, getDoneFile, getWsdlFile, getWsdlURI, runForked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDL2JavaMojo

public WSDL2JavaMojo()
Method Detail

mergeOptions

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 list

Parameters:
options -

shouldRun

protected boolean shouldRun(GenericWsdlOption genericWsdlOption,
                            File doneFile,
                            URI wsdlURI)
Determine if code should be generated from the given wsdl

Specified by:
shouldRun in class AbstractCodegenMoho
Parameters:
wsdlOption -
doneFile -
wsdlURI -
Returns:

getTimestamp

protected long getTimestamp(URI uri)
Finds the timestamp for a given URI. Calls getBaseFileURI(URI) prior to the timestamp check in order to handle "classpath" and "jar" URIs.

Parameters:
uri - the URI to timestamp
Returns:
a timestamp

getBaseFileURI

protected URI getBaseFileURI(URI uri)
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 MojoExecutionException
Overrides:
generateCommandLine in class AbstractCodegenMoho
Throws:
MojoExecutionException

generate

protected Bus generate(GenericWsdlOption genericWsdlOption,
                       Bus bus,
                       Set<URI> classPath)
                throws MojoExecutionException
Specified by:
generate in class AbstractCodegenMoho
Throws:
MojoExecutionException

createWsdlOptionsFromScansAndExplicitWsdlOptions

protected List<GenericWsdlOption> createWsdlOptionsFromScansAndExplicitWsdlOptions()
                                                                            throws MojoExecutionException
Specified by:
createWsdlOptionsFromScansAndExplicitWsdlOptions in class AbstractCodegenMoho
Returns:
effective WsdlOptions
Throws:
MojoExecutionException

getGeneratedSourceRoot

protected File getGeneratedSourceRoot()
Specified by:
getGeneratedSourceRoot in class AbstractCodegenMoho

getGeneratedTestRoot

protected File getGeneratedTestRoot()
Specified by:
getGeneratedTestRoot in class AbstractCodegenMoho

getForkClass

protected Class<?> getForkClass()
Specified by:
getForkClass in class AbstractCodegenMoho

execute

public void execute()
             throws MojoExecutionException
Overrides:
execute in class AbstractCodegenMoho
Throws:
MojoExecutionException

getMarkerSuffix

protected String getMarkerSuffix()
Specified by:
getMarkerSuffix in class AbstractCodegenMoho

Apache CXF API

Apache CXF