axis2-aar-maven-plugin/axis2-wsdl2code-maven-plugin combination creates aar file with services.xml in wrong location --------------------------------------------------------------------------------------------------------------------
Key: AXIS2-1302 URL: http://issues.apache.org/jira/browse/AXIS2-1302 Project: Apache Axis 2.0 (Axis2) Issue Type: Bug Components: Tools Affects Versions: nightly Reporter: Terry Cox Priority: Minor If you create source code from a WSDL file using the axis2-wsdl2code-maven-plugin, the services.xml file is created in a resources folder, along with a copy of the WSDL. If you now build the source using Maven2 and then package using axis2-aar-maven-plugin, the services.xml file ends up in the root of the aar when it should be in META-INF. The correct solution would probably be to have axis2-wsdl2code-maven-plugin put the original files into resources/META-INF so the Maven build copies them correctly. Similarly, the following problem occurs during code generation: Say we have an outputDirectory of 'src/main'. After generation, we get the following heirarchy: src / main / resources src / main / src src / main / test however, Maven2 expects to find java source in a folder called 'java', so it would be better to output the code into a folder that matches the language selected: src / main / resources src / main / resources/META-INF src / main / java src / main / test By doing this, a single Maven2 POM file can be used to generate, compile and package the service, as shown below: <?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>com.foo.bar</groupId> <artifactId>echo_service</artifactId> <version>1.0-SNAPSHOT</version> <name>Code generation from WSDL</name> <dependencies> <dependency> <groupId>xmlbeans</groupId> <artifactId>xbean</artifactId> <version>2.1.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>stax</groupId> <artifactId>stax-api</artifactId> <version>1.0.1</version> </dependency> <dependency> <groupId>axis2</groupId> <artifactId>axis2-kernel</artifactId> <version>SNAPSHOT</version> </dependency> <dependency> <groupId>ws-commons</groupId> <artifactId>axiom-api</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>ws-commons</groupId> <artifactId>axiom-impl</artifactId> <version>SNAPSHOT</version> </dependency> <dependency> <groupId>ws-commons</groupId> <artifactId>neethi</artifactId> <version>1.0.1</version> </dependency> <dependency> <groupId>org.apache.ws.commons</groupId> <artifactId>neethi</artifactId> <version>SNAPSHOT</version> </dependency> <dependency> <groupId>wsdl4j</groupId> <artifactId>wsdl4j</artifactId> <version>1.5.3</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.axis2.maven2</groupId> <artifactId>axis2-wsdl2code-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> <executions> <execution> <phase>wsdl2code</phase> <goals> <goal>wsdl2code</goal> </goals> </execution> </executions> <configuration> <generateServerSide>true</generateServerSide> <generateServerSideInterface>true</generateServerSideInterface> <generateAllClasses>true</generateAllClasses> <generateServiceXml>true</generateServiceXml> <generateTestcase>true</generateTestcase> <packageName>com.foo.bar.echo</packageName> <wsdlFile>wsdl/Echo.wsdl</wsdlFile> <outputDirectory>src/main</outputDirectory> <syncMode>both</syncMode> <databindingName>xmlbeans</databindingName> <language>java</language> </configuration> </plugin> <plugin> <groupId>org.apache.axis2.maven2</groupId> <artifactId>axis2-aar-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> <executions> <execution> <phase>package</phase> <goals> <goal>aar</goal> </goals> </execution> </executions> <configuration> <outputDirectory>target</outputDirectory> <aarName>echo</aarName> </configuration> </plugin> </plugins> </build> </project> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]