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 18:35:53 UTC

svn commit: r1793393 - in /axis/axis2/java/core/trunk: ./ apidocs/pom.xml modules/adb-tests/pom.xml modules/adb-tests/sub-build.xml modules/tool/axis2-xsd2java-maven-plugin/ pom.xml src/site/xdoc/tools/index.xml

Author: veithen
Date: Mon May  1 18:35:53 2017
New Revision: 1793393

URL: http://svn.apache.org/viewvc?rev=1793393&view=rev
Log:
AXIS2-5785: Add axis2-xsd2java-maven-plugin and use it in adb-tests. Based on a proposal submitted by Jeff Thomas.

Added:
    axis/axis2/java/core/trunk/modules/tool/axis2-xsd2java-maven-plugin/
      - copied from r1793391, axis/axis2/java/core/branches/AXIS2-5785/modules/tool/axis2-xsd2java-maven-plugin/
Removed:
    axis/axis2/java/core/trunk/modules/adb-tests/sub-build.xml
Modified:
    axis/axis2/java/core/trunk/   (props changed)
    axis/axis2/java/core/trunk/apidocs/pom.xml
    axis/axis2/java/core/trunk/modules/adb-tests/pom.xml
    axis/axis2/java/core/trunk/pom.xml
    axis/axis2/java/core/trunk/src/site/xdoc/tools/index.xml

Propchange: axis/axis2/java/core/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May  1 18:35:53 2017
@@ -1,3 +1,4 @@
 /axis/axis2/java/core/branches/1_6:1295540
 /axis/axis2/java/core/branches/AXIOM-420:1334386-1336397
 /axis/axis2/java/core/branches/AXIS2-4318:1230452,1295542,1324772,1327468,1329571,1332141,1335355,1335357,1340985
+/axis/axis2/java/core/branches/AXIS2-5785:1793298-1793391

Modified: axis/axis2/java/core/trunk/apidocs/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/apidocs/pom.xml?rev=1793393&r1=1793392&r2=1793393&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/apidocs/pom.xml (original)
+++ axis/axis2/java/core/trunk/apidocs/pom.xml Mon May  1 18:35:53 2017
@@ -218,6 +218,11 @@
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
+            <artifactId>axis2-xsd2java-maven-plugin</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
             <artifactId>simple-server-maven-plugin</artifactId>
             <version>${project.version}</version>
         </dependency>

Modified: axis/axis2/java/core/trunk/modules/adb-tests/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-tests/pom.xml?rev=1793393&r1=1793392&r2=1793393&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb-tests/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/adb-tests/pom.xml Mon May  1 18:35:53 2017
@@ -43,13 +43,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <!-- TODO: remove this when we switch to the axis2-xsd2java-maven plugin -->
-            <groupId>${project.groupId}</groupId>
-            <artifactId>axis2-adb-codegen</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>axis2-transport-local</artifactId>
             <version>${project.version}</version>
@@ -91,48 +84,100 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>axis2-xsd2java-maven-plugin</artifactId>
+                <version>${project.version}</version>
                 <executions>
                     <execution>
-                        <id>generate-test-sources</id>
-                        <phase>generate-test-sources</phase>
+                        <id>xsd2java</id>
+                        <goals>
+                            <goal>generate-test-sources</goal>
+                        </goals>
                         <configuration>
-                            <tasks unless="maven.test.skip">
-                                <property name="maven.junit.jvmargs" value="" />
-                                <path id="maven.dependency.classpath">
-                                    <path refid="maven.test.classpath" />
-                                </path>
-                                <property name="compiled.classes.dir" value="target/classes" />
-                                <!-- Theres got to be a better way to do this -->
-                                <property name="schema.source.dir" value="../adb-codegen/test-resources/xsd" />
-                                <property name="testsuite.source.dir" value="../adb-codegen/test-resources/testsuite" />
-                                <property name="schema.output.base.dir" value="target/schema" />
-                                <property name="schema.generated.src.dir" value="${schema.output.base.dir}/src" />
-                                <property name="schema.generated.classes.dir" value="${schema.output.base.dir}/classes" />
-                                <ant antfile="sub-build.xml" inheritall="true" inheritrefs="true" dir="." target="main" />
-                            </tasks>
+                            <xsdFiles>
+                                <xsdFile>../adb-codegen/test-resources/xsd/simple_maxOccurs2.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/anonymous_complexType.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/simple_choice.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/simple_particle_all.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/simple_maxOccurs.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/simple_anytype.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/simple-minoccurs0.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/complex-minoccurs0.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/simple-recursive-datatypes.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/mixed_minoccus0.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/simple/simpleType-All.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/xsd/derived/derivedType-All.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/testsuite.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/extensions.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/union.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/all.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/enumeration.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/restrictions.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/choice.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/list.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/references.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/innerchoice.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/attribute.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/boolean.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/particlemaxoccurs.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/innerParticles.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/default_namespaces.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/groups.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/base64binary.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/abstract.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/decimal.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/anytype.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/innerParticleExtension.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/union2.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/default_value.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/complexExtension.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/chameleon.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/nonamespace.xsd</xsdFile> <!-- compile only; no tests -->
+                                <xsdFile>../adb-codegen/test-resources/testsuite/unqualified.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/unqualified/companyservice.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/names.xsd</xsdFile> <!-- compile only; no tests -->
+                                <xsdFile>../adb-codegen/test-resources/testsuite/std-schemas.xsd</xsdFile> <!-- compile only; no tests -->
+                                <xsdFile>../adb-codegen/test-resources/xsd/fixed_value.xsd</xsdFile>
+                            </xsdFiles>
                         </configuration>
+                    </execution>
+                    <execution>
+                        <id>xsd2java-nonamespace</id>
                         <goals>
-                            <goal>run</goal>
+                            <goal>generate-test-sources</goal>
                         </goals>
+                        <configuration>
+                            <xsdFiles>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/nonamespace.xsd</xsdFile>
+                            </xsdFiles>
+                            <noNamespacePackageName>org.apache.axis2.schema.nonamespace</noNamespacePackageName>
+                            <mapperClassPackage>org.apache.axis2.schema.nonamespace</mapperClassPackage>
+                        </configuration>
                     </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
                     <execution>
-                        <id>add-test-source</id>
-                        <phase>process-test-resources</phase>
+                        <id>xsd2java-helper-mode</id>
                         <goals>
-                            <goal>add-test-source</goal>
+                            <goal>generate-test-sources</goal>
                         </goals>
                         <configuration>
-                            <sources>
-                                <source>${basedir}/target/schema/src</source>
-                            </sources>
+                            <xsdFiles>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/testsuite.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/all.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/boolean.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/chameleon.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/choice.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/decimal.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/default_value.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/enumeration.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/groups.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/innerchoice.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/innerParticleExtension.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/unqualified.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/unqualified/companyservice.xsd</xsdFile>
+                                <xsdFile>../adb-codegen/test-resources/testsuite/names.xsd</xsdFile> <!-- compile only; no tests -->
+                            </xsdFiles>
+                            <helperMode>true</helperMode>
+                            <packageName>helper.</packageName>
                         </configuration>
                     </execution>
                 </executions>

Modified: axis/axis2/java/core/trunk/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/pom.xml?rev=1793393&r1=1793392&r2=1793393&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/pom.xml (original)
+++ axis/axis2/java/core/trunk/pom.xml Mon May  1 18:35:53 2017
@@ -70,6 +70,7 @@
         <module>modules/tool/axis2-mar-maven-plugin</module>
         <module>modules/tool/axis2-repo-maven-plugin</module>
         <module>modules/tool/axis2-wsdl2code-maven-plugin</module>
+        <module>modules/tool/axis2-xsd2java-maven-plugin</module>
         <module>modules/tool/simple-server-maven-plugin</module>
         <module>modules/tool/archetype/quickstart</module>
         <module>modules/tool/archetype/quickstart-webapp</module>

Modified: axis/axis2/java/core/trunk/src/site/xdoc/tools/index.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/tools/index.xml?rev=1793393&r1=1793392&r2=1793393&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/tools/index.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/tools/index.xml Mon May  1 18:35:53 2017
@@ -109,6 +109,14 @@ WSDL.</p>
                         <p>This plugin creates Axis2 repositories from project dependencies.</p>
                     </td>
                 </tr>
+                <tr>
+                    <td>
+                        <a href="maven-plugins/axis2-xsd2java-maven-plugin/index.html">axis2-xsd2java-maven-plugin</a>
+                    </td>
+                    <td>
+                        <p>This plugin generates ADB beans from a set of XSD files.</p>
+                    </td>
+                </tr>
 			</tbody>
 		</table>
 		<p>The command line tools and Ant tasks are bundled with the Axis2 binary distribution.