Class TestWsGenMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.jvnet.jax_ws_commons.jaxws.TestWsGenMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="wsgen-test", defaultPhase=PROCESS_TEST_CLASSES, requiresDependencyResolution=TEST) public class TestWsGenMojo extends org.apache.maven.plugin.AbstractMojo
Reads a JAX-WS service endpoint implementation class and generates all of the portable artifacts for a JAX-WS web service (into the generate test source directory).

${maven.test.skip} property is honored. If it is set, code generation is skipped.

  • Field Details

    • project

      @Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
      The Maven Project Object.
    • verbose

      @Parameter(defaultValue="false") protected boolean verbose
      Output messages about what the tool is doing.
    • keep

      @Parameter(defaultValue="true") protected boolean keep
      Keep generated files.
    • encoding

      @Parameter(property="project.build.sourceEncoding") protected String encoding
      Specify character encoding used by source files.
    • pluginDescriptor

      @Parameter(defaultValue="${plugin}", readonly=true) protected org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor
    • buildContext

      @Component protected org.sonatype.plexus.build.incremental.BuildContext buildContext
  • Constructor Details

    • TestWsGenMojo

      public TestWsGenMojo()
  • Method Details

    • getDestDir

      protected File getDestDir()
      Either ${build.outputDirectory} or ${build.testOutputDirectory}.
    • getSourceDestDir

      protected File getSourceDestDir()
      ${project.build.directory}/generated-sources/test-wsgen.
    • getGenWSDL

      protected boolean getGenWSDL()
    • addSourceRoot

      protected void addSourceRoot(String sourceDir)
    • getResourceDestDir

      protected File getResourceDestDir()
    • getDefaultSrcOut

      protected File getDefaultSrcOut()
    • getClassesDir

      protected File getClassesDir()
    • getExtraClasspath

      protected String getExtraClasspath()
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • processSei

      protected void processSei(String sei) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getMain

      protected String getMain()
    • getXnocompile

      protected boolean getXnocompile()
    • getWsGenArgs

      protected List<String> getWsGenArgs(String aSei, boolean attachResources) throws org.apache.maven.plugin.MojoExecutionException
      Construct wsgen arguments
      Parameters:
      aSei - web service
      attachResources - true to attach resources to the project
      Returns:
      a list of arguments
      Throws:
      org.apache.maven.plugin.MojoExecutionException - for errors
    • isExtensionOn

      protected boolean isExtensionOn()
    • getCommonArgs

      protected List<String> getCommonArgs() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • isArgSupported

      protected boolean isArgSupported(String arg) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • exec

      protected void exec(List<String> args) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • maybeUnsupportedOption

      protected void maybeUnsupportedOption(String option, String value, List<String> args)
    • getExtraDependencies

      protected String[] getExtraDependencies()
    • getExtraArtifactIDs

      protected String[] getExtraArtifactIDs()