From: Emmanuel V. <ve...@us...> - 2004-12-06 15:41:39
|
venisse 04/12/06 07:41:32 Modified: axis plugin.jelly plugin.properties project.xml axis/xdocs goals.xml properties.xml tasks.xml Log: - Add some property to wsdl2java generation - Add java2wsdl generation goal - Add new wsdl2java goal as default goal. Revision Changes Path 1.3 +75 -13 maven-plugins/axis/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/axis/plugin.jelly,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- plugin.jelly 23 Oct 2004 16:21:33 -0000 1.2 +++ plugin.jelly 6 Dec 2004 15:41:30 -0000 1.3 @@ -7,17 +7,22 @@ xmlns:u="jelly:util"> <!-- global definitions --> - <ant:path id="axis.classpath"> - <ant:pathelement path="${plugin.getDependencyPath('axis:axis')}"/> - <ant:pathelement path="${plugin.getDependencyPath('axis:axis-ant')}"/> - <ant:pathelement path="${plugin.getDependencyPath('xerces:xerces')}"/> - <ant:pathelement path="${plugin.getDependencyPath('xerces:xercesImpl')}"/> - <ant:pathelement path="${plugin.getDependencyPath('xml-apis')}"/> - <ant:pathelement path="${plugin.getDependencyPath('jaxrpc')}"/> - <ant:pathelement path="${plugin.getDependencyPath('saaj')}"/> - </ant:path> - - <ant:taskdef classpath="${plugin.getDependencyPath('axis:axis-ant')}" resource="axis-tasks.properties" /> + <ant:taskdef resource="axis-tasks.properties"> + <ant:classpath> + <ant:pathelement path="${plugin.getDependencyPath('axis:axis')}"/> + <ant:pathelement path="${plugin.getDependencyPath('axis:axis-ant')}"/> + <ant:pathelement path="${plugin.getDependencyPath('xerces:xerces')}"/> + <ant:pathelement path="${plugin.getDependencyPath('xerces:xercesImpl')}"/> + <ant:pathelement path="${plugin.getDependencyPath('xml-apis')}"/> + <ant:pathelement path="${plugin.getDependencyPath('jaxrpc:jaxrpc-api')}"/> + <ant:pathelement path="${plugin.getDependencyPath('saaj:saaj-api')}"/> + <ant:pathelement path="${plugin.getDependencyPath('wsdl4j')}"/> + <ant:pathelement path="${plugin.getDependencyPath('commons-discovery')}"/> + <ant:pathelement path="${plugin.getDependencyPath('commons-logging')}"/> + <ant:path refid="maven.dependency.classpath"/> + <ant:pathelement path="${maven.build.dest}"/> + </ant:classpath> + </ant:taskdef> <j:set var="axis.build.dir" value="${maven.axis.build.dir}" /> @@ -47,7 +52,7 @@ <!-- A X I S --> <!-- ================================================================== --> <goal name="axis:axis" description="generate java files from wsdl definitions." - prereqs="axis:prepare-filesystem"> + prereqs="axis:prepare-filesystem,test:test-resources,java:jar-resources"> <j:catch var="ex"> <j:set var="wsdlSource" value="${axis.url}" /> @@ -67,14 +72,18 @@ <!-- wsdl2java --> <axis-wsdl2java all="${maven.axis.all}" + debug="${maven.axis.debug}" output="${axis.generated.dir}" testcase="${maven.axis.testcase}" verbose="${maven.axis.verbose}" deployscope="${maven.axis.deployscope}" + factory="${maven.axis.factory}" + helpergen="${maven.axis.helpergen}" skeletondeploy="${maven.axis.skeletondeploy}" noimports="${maven.axis.noimports}" typemappingVersion="${maven.axis.typemappingversion}" serverside="${maven.axis.serverside}" + timeout="${maven.axis.timeout}" url="${wsdlFile}"> </axis-wsdl2java> @@ -92,14 +101,18 @@ <!-- wsdl2java --> <axis-wsdl2java all="${maven.axis.all}" + debug="${maven.axis.debug}" output="${axis.generated.dir}" testcase="${maven.axis.testcase}" verbose="${maven.axis.verbose}" deployscope="${maven.axis.deployscope}" + factory="${maven.axis.factory}" + helpergen="${maven.axis.helpergen}" skeletondeploy="${maven.axis.skeletondeploy}" noimports="${maven.axis.noimports}" typemappingVersion="${maven.axis.typemappingversion}" serverside="${maven.axis.serverside}" + timeout="${maven.axis.timeout}" url="${axis.url}"> <!-- mapping of namespaces to package names --> @@ -169,11 +182,60 @@ </goal> <!-- ================================================================== --> + <!-- W S D L 2 J A V A --> + <!-- ================================================================== --> + <goal name="axis:wsdl2java" + description="Generate java files from wsdl definitions and compile them." + prereqs="axis:compile" + /> + + <!-- ================================================================== --> + <!-- J A V A 2 W S D L --> + <!-- ================================================================== --> + <goal name="axis:java2wsdl" + description="Generates a WSDL description from a Java class or interface."> + + <j:if test="${context.getVariable('maven.axis.classnames') == null}"> + <j:set var="message" value="You must specify maven.axis.classnames property." /> + <ant:echo>${message}</ant:echo> + <ant:fail message="${message}" /> + </j:if> + + <j:if test="${context.getVariable('maven.axis.namespace') == null}"> + <j:set var="message" value="You must specify maven.axis.namespace property." /> + <ant:echo>${message}</ant:echo> + <ant:fail message="${message}" /> + </j:if> + + <u:tokenize var="classes" delim=",">${maven.axis.classnames}</u:tokenize> + <j:forEach var="classname" items="${classes}"> + <ant:echo>generate .wsdl file from ${classname}</ant:echo> + <axis-java2wsdl + classname="${classname}" + exclude="${maven.axis.java2wsdl.exclude}" + location="${maven.axis.location}" + namespace="${maven.axis.namespace}" + output="${maven.axis.output}/${classname}.wsdl" + typemappingversion="${maven.axis.typemappingversion}" + useinheritedmethods="${maven.axis.useinheritedmethods}"> + + <!-- mapping of namespaces to package names --> + <u:tokenize var="urnMappings" delim=",">${maven.java2wsdl.namespaceMappings}</u:tokenize> + <j:forEach var="urnMapping" items="${urnMappings}"> + <u:tokenize var="keyValue" delim="=">${urnMapping}</u:tokenize> + <mapping namespace="${keyValue[0]}" package="${keyValue[1]}"/> + </j:forEach> + + </axis-java2wsdl> + </j:forEach> + </goal> + + <!-- ================================================================== --> <!-- D E F A U L T G O A L --> <!-- ================================================================== --> <goal name="axis" description="Generate java files from wsdl definitions and compile them." - prereqs="axis:compile" + prereqs="axis:wsdl2java" /> </project> 1.3 +13 -2 maven-plugins/axis/plugin.properties Index: plugin.properties =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/axis/plugin.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- plugin.properties 23 Oct 2004 16:21:33 -0000 1.2 +++ plugin.properties 6 Dec 2004 15:41:30 -0000 1.3 @@ -5,14 +5,25 @@ maven.axis.url=${maven.src.dir}/wsdl maven.axis.all=true maven.axis.deployscope=session +maven.axis.factory=org.apache.axis.wsdl.toJava.JavaGeneratorFactory +maven.axis.helpergen=false maven.axis.serverside=true maven.axis.skeletondeploy=true maven.axis.noimports=no maven.axis.verbose=yes -maven.axis.typemappingversion=1.4 +maven.axis.debug=false +maven.axis.typemappingversion=1.1 +maven.axis.timeout=45000 maven.axis.testcase=yes maven.axis.build.dir=${maven.axis.dir}/build maven.axis.excludes= -maven.axis.namespaceMappings= +maven.wsdl2java.namespaceMappings= + +############################# +# Java2WSDL +############################# +maven.axis.java2wsdl.exclude= +maven.axis.useinheritedmethods=false +maven.axis.output=${maven.src.dir}/wsdl 1.3 +11 -31 maven-plugins/axis/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/axis/project.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- project.xml 23 Oct 2004 16:21:33 -0000 1.2 +++ project.xml 6 Dec 2004 15:41:30 -0000 1.3 @@ -10,7 +10,7 @@ <name>Maven Axis Plugin</name> <!-- groupId is in parent --> - <currentVersion>0.5</currentVersion> + <currentVersion>0.6-SNAPSHOT</currentVersion> <!-- organization is in parent --> <inceptionYear>2004</inceptionYear> @@ -80,6 +80,16 @@ <url>http://dan.greening.name</url> <timezone>-8</timezone> </developer> + <developer> + <name>Emmanuel Venisse</name> + <id>evenisse</id> + <email>eve...@ap...</email> + <organization></organization> + <roles> + <role>Developer</role> + </roles> + <timezone>+1</timezone> + </developer> </developers> <contributors> @@ -94,81 +104,51 @@ <groupId>wsdl4j</groupId> <artifactId>wsdl4j</artifactId> <version>1.0</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> <dependency> <groupId>axis</groupId> <artifactId>axis</artifactId> <version>1.1</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> <dependency> <groupId>axis</groupId> <artifactId>axis-ant</artifactId> <version>1.1</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xerces</artifactId> <version>2.4.0</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> <dependency> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> <version>2.0.2</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.4.0</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> <dependency> <groupId>jaxrpc</groupId> <artifactId>jaxrpc-api</artifactId> <version>1.1</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> <dependency> <groupId>saaj</groupId> <artifactId>saaj-api</artifactId> <version>1.1</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.3</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> <dependency> <groupId>commons-discovery</groupId> <artifactId>commons-discovery</artifactId> <version>0.2</version> - <properties> - <classloader>root</classloader> - </properties> </dependency> </dependencies> 1.3 +8 -0 maven-plugins/axis/xdocs/goals.xml Index: goals.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/axis/xdocs/goals.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- goals.xml 23 Oct 2004 16:21:34 -0000 1.2 +++ goals.xml 6 Dec 2004 15:41:31 -0000 1.3 @@ -30,6 +30,14 @@ Those files in the ${maven.axis.excludes} list are not copied. </description> </goal> + <goal> + <name>axis:java2wsdl</name> + <description>Generates a WSDL description from a Java class or interface.</description> + </goal> + <goal> + <name>axis:wsdl2java</name> + <description>Generate java classes from wsdl definitions and compile them.</description> + </goal> </goals> </body> </document> 1.3 +98 -0 maven-plugins/axis/xdocs/properties.xml Index: properties.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/axis/xdocs/properties.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- properties.xml 23 Oct 2004 16:21:34 -0000 1.2 +++ properties.xml 6 Dec 2004 15:41:31 -0000 1.3 @@ -61,6 +61,71 @@ </tr> </table> </section> + <section name="java2wsdl properties"> + <table> + <tr> + <th>Property</th> + <th>Default</th> + <th>Optional?</th> + <th>Description</th> + </tr> + <tr> + <td>maven.axis.classnames</td> + <td></td> + <td>No</td> + <td> + Specifies a comma-separated list of classes names to import, eg. org.example.Foo. Required. + </td> + </tr> + <tr> + <td>maven.axis.namespace</td> + <td></td> + <td>No</td> + <td> + Specifies the target namespace. Required. + </td> + </tr> + <tr> + <td>maven.axis.java2wsdl.exclude</td> + <td></td> + <td>Yes</td> + <td> + Specifies comma separated list of methods to exclude from the wsdl file. + </td> + </tr> + <tr> + <td>maven.axis.location</td> + <td></td> + <td>No</td> + <td> + Specifies the url of the location of the service. + </td> + </tr> + <tr> + <td>maven.axis.output</td> + <td>${maven.src.dir}/wsdl</td> + <td>Yes</td> + <td> + Specifies the directory which contains all .wsdl files. + </td> + </tr> + <tr> + <td>maven.axis.typemappingversion</td> + <td>1.1</td> + <td>Yes</td> + <td> + </td> + </tr> + <tr> + <td>maven.axis.useinheritedmethods</td> + <td>false</td> + <td>Yes</td> + <td> + Specified if wsdl should inherited methods be exported too. + </td> + </tr> + </table> + </section> <section name="wsdl2java properties"> <table> <tr> @@ -147,6 +212,39 @@ respectively. Default is empty. </td> </tr> + <tr> + <td>maven.axis.debug</td> + <td>false</td> + <td>Yes</td> + <td> + Specifies if output is in debug mode. + </td> + </tr> + <tr> + <td>maven.axis.factory</td> + <td>org.apache.axis.wsdl.toJava.JavaGeneratorFactory</td> + <td>Yes</td> + <td> + Specifies the name of the Java2WSDLFactory class for extending WSDL generation functions. + </td> + </tr> + <tr> + <td>maven.axis.helpergen</td> + <td>false</td> + <td>Yes</td> + <td> + Turn on/off Helper class generation. + </td> + </tr> + <tr> + <td>maven.axis.timeout</td> + <td>false</td> + <td>Yes</td> + <td> + Specifies the timeout in milliseconds for URL retrieval; default is 45 seconds. + Set this to -1 to disable timeouts altogether: other negative values are not allowed. + </td> + </tr> </table> </section> </body> 1.3 +0 -3 maven-plugins/axis/xdocs/tasks.xml Index: tasks.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/axis/xdocs/tasks.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- tasks.xml 23 Oct 2004 16:21:34 -0000 1.2 +++ tasks.xml 6 Dec 2004 15:41:31 -0000 1.3 @@ -19,9 +19,6 @@ New features: <ul> <li> - Generate wsdl definitions from Java interfaces using java2wsdl. - </li> - <li> Support for XML to Java types. </li> <li> |