blob: 1eca2ec60d131722e493407cdbab324d2052d511 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-parent</artifactId>
<version>1.6.0</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
<artifactId>axis2-ant-plugin</artifactId>
<name>Apache Axis2 - tool - Ant Plugin</name>
<description>The Axis 2 Plugin for Ant Tasks.</description>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/axis/axis2/java/core/tags/v1.6.0/modules/tool/axis2-ant-plugin</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/axis/axis2/java/core/tags/v1.6.0/modules/tool/axis2-ant-plugin</developerConnection>
<url>http://svn.apache.org/viewvc/axis/axis2/java/core/tags/v1.6.0/modules/tool/axis2-ant-plugin</url>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-codegen</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb-codegen</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-java2wsdl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.neethi</groupId>
<artifactId>neethi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-javamail_1.4_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-activation_1.1_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<resourceBundles>
<resourceBundle>org.apache.axis2:axis2-resource-bundle:${pom.version}</resourceBundle>
</resourceBundles>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>run</goal>
</goals>
<phase>test</phase>
<configuration>
<tasks unless="maven.test.skip">
<taskdef name="java2wsdl" classname="org.apache.axis2.tool.ant.Java2WSDLTask">
<classpath>
<path refid="maven.test.classpath" />
</classpath>
</taskdef>
<echo message="Generating extraclasses*.wsdl" />
<java2wsdl className="test.Service" outputLocation="${project.build.directory}/java2wsdl" outputFileName="extraclasses1.wsdl">
<extraclass name="test.ExtraClass1" />
<extraclass name="test.ExtraClass2" />
</java2wsdl>
<java2wsdl className="test.Service" outputLocation="${project.build.directory}/java2wsdl" outputFileName="extraclasses2.wsdl" extraClasses="test.ExtraClass1,test.ExtraClass2" />
<java2wsdl className="test.Service" outputLocation="${project.build.directory}/java2wsdl" outputFileName="extraclasses3.wsdl" extraClasses="test.ExtraClass1">
<extraclass name="test.ExtraClass2" />
</java2wsdl>
<echo message="Generating mappings.wsdl" />
<java2wsdl className="test.Service" outputLocation="${project.build.directory}/java2wsdl" outputFileName="mappings.wsdl" schemaTargetNamespace="http://www.example.org/schema/test-service">
<mapping package="test" namespace="http://www.example.org/schema/test" />
</java2wsdl>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
import groovy.xml.*
if (project.properties['maven.test.skip']) {
println 'Tests are skipped'
return
}
def parser = new XmlParser()
def wsdl = new Namespace('http://schemas.xmlsoap.org/wsdl/')
def xs = new Namespace('http://www.w3.org/2001/XMLSchema')
println 'Checking extraclasses*.wsdl'
for (i in 1..3) {
def wsdlDoc = parser.parse(new File(project.build.directory, "java2wsdl/extraclasses${i}.wsdl"))
def complexTypes = wsdlDoc[wsdl.types][xs.schema][xs.complexType].'@name'
assert complexTypes.contains('ExtraClass1')
assert complexTypes.contains('ExtraClass2')
}
println 'Checking mappings.wsdl'
def wsdlDoc = parser.parse(new File(project.build.directory, "java2wsdl/mappings.wsdl"))
def namespaces = wsdlDoc[wsdl.types][xs.schema].'@targetNamespace'
assert namespaces.contains('http://www.example.org/schema/test-service')
assert namespaces.contains('http://www.example.org/schema/test')
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>