You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2017/05/01 11:56:35 UTC

svn commit: r1793313 - in /axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin: pom.xml src/main/java/org/apache/axis2/maven2/xsd2java/XSD2JavaMojo.java

Author: veithen
Date: Mon May  1 11:56:34 2017
New Revision: 1793313

URL: http://svn.apache.org/viewvc?rev=1793313&view=rev
Log:
Normalize whitespace.

Modified:
    axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/pom.xml
    axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/src/main/java/org/apache/axis2/maven2/xsd2java/XSD2JavaMojo.java

Modified: axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/pom.xml?rev=1793313&r1=1793312&r2=1793313&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/pom.xml (original)
+++ axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/pom.xml Mon May  1 11:56:34 2017
@@ -2,30 +2,30 @@
 
 <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.axis2</groupId>
-    <artifactId>axis2</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
-    <relativePath>../../../pom.xml</relativePath>
-  </parent>
+    <parent>
+        <groupId>org.apache.axis2</groupId>
+        <artifactId>axis2</artifactId>
+        <version>1.8.0-SNAPSHOT</version>
+        <relativePath>../../../pom.xml</relativePath>
+    </parent>
 
-  <artifactId>axis2-xsd2java-maven-plugin</artifactId>
-  <packaging>maven-plugin</packaging>
+    <artifactId>axis2-xsd2java-maven-plugin</artifactId>
+    <packaging>maven-plugin</packaging>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.axis2</groupId>
-      <artifactId>axis2-adb-codegen</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-core</artifactId>
-    </dependency>
-  </dependencies>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-adb-codegen</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-core</artifactId>
+        </dependency>
+    </dependencies>
 
 </project>

Modified: axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/src/main/java/org/apache/axis2/maven2/xsd2java/XSD2JavaMojo.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/src/main/java/org/apache/axis2/maven2/xsd2java/XSD2JavaMojo.java?rev=1793313&r1=1793312&r2=1793313&view=diff
==============================================================================
--- axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/src/main/java/org/apache/axis2/maven2/xsd2java/XSD2JavaMojo.java (original)
+++ axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/src/main/java/org/apache/axis2/maven2/xsd2java/XSD2JavaMojo.java Mon May  1 11:56:34 2017
@@ -19,80 +19,80 @@ import org.apache.maven.project.MavenPro
  */
 public class XSD2JavaMojo extends AbstractMojo {
 
-  /**
-   * The maven project.
-   * @parameter expression="${project}"
-   * @read-only
-   * @required
-   */
-  protected MavenProject project;
-
-  /**
-   * The list of XSD files for which to generate the Java code.
-   * @parameter
-   * @required true
-   */
-  protected List<String> xsdFiles;
-
-  /**
-   * The output directory to generate the source into.
-   * @parameter
-   * @required true
-   */
-  public File outputFolder;
-
-  /**
-   * Specify namespaces explicitly for packages.
-   * @parameter
-   */
-  protected List<String> namespace2Packages;
-
-  /**
-   * Run the 'xsd2java' utility.
-   * @throws MojoExecutionException if an error occurs during processing
-   * @throws MojoFailureException if an error occurs during processing
-   */
-  public void execute() throws MojoExecutionException, MojoFailureException {
-
-    String[] args = getCommandLineArgumentsForXSD2Java();
-
-    try {
-      XSD2Java.main(args);
-    } catch (Exception ex) {
-      ex.printStackTrace();
-      throw new MojoExecutionException("An error occurred during 'xsd2java' processing: " + ex.getMessage(), ex);
-    }
-
-  }
+    /**
+     * The maven project.
+     * @parameter expression="${project}"
+     * @read-only
+     * @required
+     */
+    protected MavenProject project;
+
+    /**
+     * The list of XSD files for which to generate the Java code.
+     * @parameter
+     * @required true
+     */
+    protected List<String> xsdFiles;
+
+    /**
+     * The output directory to generate the source into.
+     * @parameter
+     * @required true
+     */
+    public File outputFolder;
+
+    /**
+     * Specify namespaces explicitly for packages.
+     * @parameter
+     */
+    protected List<String> namespace2Packages;
+
+    /**
+     * Run the 'xsd2java' utility.
+     * @throws MojoExecutionException if an error occurs during processing
+     * @throws MojoFailureException if an error occurs during processing
+     */
+    public void execute() throws MojoExecutionException, MojoFailureException {
+
+        String[] args = getCommandLineArgumentsForXSD2Java();
+
+        try {
+            XSD2Java.main(args);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MojoExecutionException("An error occurred during 'xsd2java' processing: " + ex.getMessage(), ex);
+        }
 
-  /**
-   * Process the maven parameters to xsd2java command-line arguments
-   * @return the array of command line arguments
-   */
-  private String[] getCommandLineArgumentsForXSD2Java() {
-
-    final List<String> commandLineArguments = new ArrayList<String>();
-
-    // add the namespace-to-package mappings
-    if (namespace2Packages != null) {
-      for (String namespace2Package : namespace2Packages) {
-        commandLineArguments.add("-ns2p");
-        commandLineArguments.add(namespace2Package);
-      }
     }
 
-    // add the XSD files
-    for (String xsdFile : xsdFiles) {
-      commandLineArguments.add(xsdFile);
-    }
+    /**
+     * Process the maven parameters to xsd2java command-line arguments
+     * @return the array of command line arguments
+     */
+    private String[] getCommandLineArgumentsForXSD2Java() {
+
+        final List<String> commandLineArguments = new ArrayList<String>();
+
+        // add the namespace-to-package mappings
+        if (namespace2Packages != null) {
+            for (String namespace2Package : namespace2Packages) {
+                commandLineArguments.add("-ns2p");
+                commandLineArguments.add(namespace2Package);
+            }
+        }
+
+        // add the XSD files
+        for (String xsdFile : xsdFiles) {
+            commandLineArguments.add(xsdFile);
+        }
 
-    // add the output path
-    commandLineArguments.add(outputFolder.getAbsolutePath());
+        // add the output path
+        commandLineArguments.add(outputFolder.getAbsolutePath());
 
-    final String[] args = commandLineArguments.toArray(new String[]{});
+        final String[] args = commandLineArguments.toArray(new String[]{});
 
-    return args;
+        return args;
 
-  }
+    }
 
 }