You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ve...@apache.org on 2009/07/03 21:17:04 UTC
svn commit: r790992 - in /webservices/axis2/trunk/java/modules/adb-codegen:
src/org/apache/axis2/schema/XSD2Java.java
src/org/apache/axis2/schema/i18n/resource.properties sub-build.xml
Author: veithen
Date: Fri Jul 3 19:17:04 2009
New Revision: 790992
URL: http://svn.apache.org/viewvc?rev=790992&view=rev
Log:
Preparing to fix ADB helper mode, part 1: Add the required options to XSD2Java so that helper mode can be enabled when generating test classes; use this to generate the code for the test schemas for which the generated code compiles.
Modified:
webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/XSD2Java.java
webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties
webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml
Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/XSD2Java.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/XSD2Java.java?rev=790992&r1=790991&r2=790992&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/XSD2Java.java (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/XSD2Java.java Fri Jul 3 19:17:04 2009
@@ -65,6 +65,12 @@
.hasArg()
.withDescription(getMessage("schema.dp.description"))
.create("dp"));
+ options.addOption(OptionBuilder.withDescription(getMessage("schema.h.description"))
+ .create("h"));
+ options.addOption(OptionBuilder.withArgName(getMessage("schema.p.argname"))
+ .hasArg()
+ .withDescription(getMessage("schema.p.description"))
+ .create("p"));
CommandLineParser parser = new GnuParser();
try {
line = parser.parse(options, args);
@@ -141,6 +147,12 @@
compilerOptions.setMapperClassPackage(line.getOptionValue("mp"));
}
+ compilerOptions.setHelperMode(line.hasOption("h"));
+
+ if (line.hasOption("p")) {
+ compilerOptions.setPackageName(line.getOptionValue("p"));
+ }
+
//todo - this should come from the users preferences
compilerOptions.setWrapClasses(false);
Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties?rev=790992&r1=790991&r2=790992&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties Fri Jul 3 19:17:04 2009
@@ -39,6 +39,9 @@
schema.mp.description=package for the mapper class
schema.dp.argname=package
schema.dp.description=default package for schemas without namespace
+schema.h.description=enable helper mode
+schema.p.argname=package
+schema.p.description=set package name
schema.compiling=Compiling {0}
schema.locationNotFolder=specified location is not a folder!
schema.compilerexception=Compiler caused an exception
Modified: webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml?rev=790992&r1=790991&r2=790992&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/sub-build.xml Fri Jul 3 19:17:04 2009
@@ -96,6 +96,20 @@
<arg file="${testsuite.source.dir}/nonamespace.xsd"/>
<arg file="${schema.generated.src.dir}"/>
</java>
+ <java classname="org.apache.axis2.schema.XSD2Java" fork="true">
+ <jvmarg line="${maven.junit.jvmargs}"/>
+ <classpath refid="maven.dependency.classpath"/>
+ <classpath location="${compiled.classes.dir}"/>
+ <arg value="-p"/>
+ <arg value="helper."/>
+ <arg value="-h"/>
+ <arg file="${testsuite.source.dir}/all.xsd"/>
+ <arg file="${testsuite.source.dir}/boolean.xsd"/>
+ <arg file="${testsuite.source.dir}/default_value.xsd"/>
+ <arg file="${testsuite.source.dir}/enumeration.xsd"/>
+ <arg file="${testsuite.source.dir}/unqualified.xsd"/>
+ <arg file="${schema.generated.src.dir}"/>
+ </java>
</target>
</project>