Class AbstractXSDToJavaMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
TestXSDToJavaMojo, XSDToJavaMojo

public abstract class AbstractXSDToJavaMojo extends org.apache.maven.plugin.AbstractMojo
CXF XSD To Java Tool
  • Field Details

    • project

      @Component protected org.apache.maven.project.MavenProject project
    • xsdOptions

      @Parameter XsdOption[] xsdOptions
    • markerDirectory

      @Parameter(defaultValue="${project.build.directory}/cxf-xsd-plugin-markers", property="cxf.markerDirectory") File markerDirectory
      Directory in which the "DONE" markers are saved that
    • extensions

      @Parameter private List<String> extensions
      The extension artifacts that will be retrieved and added to the classpath.
    • buildContext

      @Component private org.sonatype.plexus.build.incremental.BuildContext buildContext
    • repository

      @Component private org.eclipse.aether.RepositorySystem repository
    • repoSession

      @Parameter(defaultValue="${repositorySystemSession}", readonly=true) private org.eclipse.aether.RepositorySystemSession repoSession
      The current repository/network configuration of Maven.
    • remoteRepos

      @Parameter(defaultValue="${project.remotePluginRepositories}", readonly=true) private List<org.eclipse.aether.repository.RemoteRepository> remoteRepos
      The project's remote repositories to use for the resolution of plugins and their dependencies.
    • fork

      @Parameter(defaultValue="false") private boolean fork
      Allows running in a separate process.
    • encoding

      @Parameter(defaultValue="${project.build.sourceEncoding}") private String encoding
    • javaExecutable

      @Parameter(defaultValue="${java.home}/bin/java") private String javaExecutable
      Sets the Java executable to use when fork parameter is true.
    • additionalJvmArgs

      @Parameter(property="cxf.xjc.jvmArgs") private String additionalJvmArgs
      Sets the JVM arguments (i.e. -Xms128m -Xmx128m) if fork is set to true.
    • pluginArtifacts

      @Parameter(property="plugin.artifacts", readonly=true, required=true) private List<org.apache.maven.artifact.Artifact> pluginArtifacts
      The plugin dependencies, needed for the fork mode.
  • Constructor Details

    • AbstractXSDToJavaMojo

      public AbstractXSDToJavaMojo()
  • Method Details

    • getOutputDir

      abstract String getOutputDir()
    • mapLocation

      private URI mapLocation(String s) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getXsdFiles

      private String[] getXsdFiles(String xsdDir, String xsd) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • resolve

      private Set<File> resolve(String artifactDescriptor) throws org.apache.maven.plugin.MojoExecutionException, org.eclipse.aether.RepositoryException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.eclipse.aether.RepositoryException
    • getClasspathElements

      protected List<String> getClasspathElements() throws org.apache.maven.artifact.DependencyResolutionRequiredException
      Throws:
      org.apache.maven.artifact.DependencyResolutionRequiredException
    • isJava9Compatible

      protected boolean isJava9Compatible()
    • run

      private int run(XsdOption option, String xsdFile, String outputDir) throws Exception
      Throws:
      Exception
    • removeMessages

      private void removeMessages(String file) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getArguments

      private String[] getArguments(XsdOption option, String outputDir) throws org.apache.maven.plugin.MojoExecutionException, MalformedURLException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      MalformedURLException
    • deleteDir

      private boolean deleteDir(File f)
    • getJavaExecutable

      private File getJavaExecutable() throws IOException
      Throws:
      IOException
    • isWindows

      private boolean isWindows()
    • runForked

      private int runForked(XsdOption option, String outputDir) throws Exception
      Throws:
      Exception