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
  • Constructor Details

    • WSDL2JavaMojo

      public WSDL2JavaMojo()
  • Method Details

    • 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:
      effectiveWsdlOptions -
    • 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 AbstractCodegenMojo
      Parameters:
      genericWsdlOption -
      doneFile -
      wsdlURI -
      Returns:
    • createMarkerFile

      protected void createMarkerFile(GenericWsdlOption wsdlOption, File doneFile, URI wsdlURI) throws IOException
      Overrides:
      createMarkerFile in class AbstractCodegenMojo
      Throws:
      IOException
    • 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 org.apache.maven.plugin.MojoExecutionException
      Overrides:
      generateCommandLine in class AbstractCodegenMojo
      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 class AbstractCodegenMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • createWsdlOptionsFromScansAndExplicitWsdlOptions

      protected List<GenericWsdlOption> createWsdlOptionsFromScansAndExplicitWsdlOptions() throws org.apache.maven.plugin.MojoExecutionException
      Specified by:
      createWsdlOptionsFromScansAndExplicitWsdlOptions in class AbstractCodegenMojo
      Returns:
      effective WsdlOptions
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getGeneratedSourceRoot

      protected File getGeneratedSourceRoot()
      Specified by:
      getGeneratedSourceRoot in class AbstractCodegenMojo
    • getGeneratedTestRoot

      protected File getGeneratedTestRoot()
      Specified by:
      getGeneratedTestRoot in class AbstractCodegenMojo
    • getForkClass

      protected Class<?> getForkClass()
      Specified by:
      getForkClass in class AbstractCodegenMojo
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Overrides:
      execute in class AbstractCodegenMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getMarkerSuffix

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