<?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.axis</groupId>
        <artifactId>axis-project</artifactId>
        <version>1.4.1-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>axis-ant</artifactId>
    <name>Ant Tasks</name>
    <url>${baseUrl}/ant</url>
    <distributionManagement>
        <site>
            <id>axis</id>
            <url>${baseSiteUrl}/ant</url>
        </site>
    </distributionManagement>
    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axis-rt-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axis-codegen</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>ant</groupId>
            <artifactId>ant</artifactId>
            <version>1.5.1</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axis-testutils</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- We run this in process-test-classes so that we can refer to test classes
                             (e.g. in java2wsdl), but also run unit tests that verify the output. -->
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <!-- TODO: be a bit more selective here: add maven.compile.classpath + log4j.jar + log4j.properties -->
                                <taskdef name="java2wsdl" classname="org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask" classpathref="maven.test.classpath" />
                                <taskdef name="wsdl2java" classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask" classpathref="maven.test.classpath" />
                                <!-- ant antfile="src/test/ant/axis2378/build.xml" target="test" inheritrefs="true" /-->
                                <ant antfile="src/test/ant/axis2900/build.xml" target="test" inheritrefs="true" />
                                <!-- ant antfile="src/test/ant/axis2901/build.xml" target="test" inheritrefs="true" /-->
                                <ant antfile="src/test/ant/clash/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/extra/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/filegen/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/generatorfactory/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/groups/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/header/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/literal/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/multibinding/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/qname/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/schemaImport/build.xml" target="test" inheritrefs="true" />
                                <ant antfile="src/test/ant/split/build.xml" target="test" inheritrefs="true" />
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Add the generated files to the test sources ... -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/work</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- ... and execute a second compilation phase to compile them. We do this for two reasons:
                  * To check that the generated sources are compilable.
                  * Some test cases need to load classes to inspect them using reflection. -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>testCompile-phase2</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <!-- These are test cases generated by wsdl2java; they are not executable
                             because we don't start an Axis test server (such tests would belong
                             to the integration tests). -->
                        <exclude>test/wsdl/clash/SharedName_ServiceTestCase.java</exclude>
                        <exclude>test/wsdl/header/HeaderServiceTestCase.java</exclude>
                        <exclude>test/wsdl/multibinding/MbServiceTestCase.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.veithen.filecheck</groupId>
                <artifactId>filecheck-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>check-multiple</goal>
                        </goals>
                        <configuration>
                            <fileSets>
                                <fileSet>
                                    <directory>${project.build.directory}/work/test/wsdl/axis2900</directory>
                                    <expectedFiles>
                                        <expectedFile>Exception.java</expectedFile>
                                        <expectedFile>MyWS.java</expectedFile>
                                        <expectedFile>MyWSException.java</expectedFile>
                                        <expectedFile>MyWSLocator.java</expectedFile>
                                        <expectedFile>MyWSPortType.java</expectedFile>
                                        <expectedFile>MyWSSoap11BindingStub.java</expectedFile>
                                    </expectedFiles>
                                </fileSet>
                                <fileSet>
                                    <directory>${project.build.directory}/work/test/wsdl/clash</directory>
                                    <expectedFiles>
                                        <expectedFile>AnotherNonSharedNameImpl.java</expectedFile>
                                        <expectedFile>AnotherNonSharedNameStub.java</expectedFile>
                                        <expectedFile>DescribeLayoutType0.java</expectedFile>
                                        <expectedFile>DescribeLayout.java</expectedFile>
                                        <expectedFile>NonSharedNameImpl.java</expectedFile>
                                        <expectedFile>NonSharedNameStub.java</expectedFile>
                                        <expectedFile>SayHello.java</expectedFile>
                                        <expectedFile>SharedName_PortType.java</expectedFile>
                                        <expectedFile>SharedName_Service.java</expectedFile>
                                        <expectedFile>SharedName_ServiceLocator.java</expectedFile>
                                        <expectedFile>SharedName_ServiceTestCase.java</expectedFile>
                                        <expectedFile>SharedName_Type.java</expectedFile>
                                        <expectedFile>deploy.wsdd</expectedFile>
                                        <expectedFile>undeploy.wsdd</expectedFile>
                                    </expectedFiles>
                                    <allowedFiles>
                                        <allowedFile>SharedName_Type_Helper.java</allowedFile>
                                    </allowedFiles>
                                </fileSet>
                                <fileSet>
                                    <directory>${project.build.directory}/work/test/wsdl/extra/gen</directory>
                                    <expectedFiles>
                                        <expectedFile>Extra.java</expectedFile> <!-- this is the important one -->
                                        <expectedFile>MyService.java</expectedFile>
                                        <expectedFile>MyServiceService.java</expectedFile>
                                        <expectedFile>MyServiceServiceLocator.java</expectedFile>
                                        <expectedFile>MyServiceSoapBindingStub.java</expectedFile>
                                        <expectedFile>MyService.wsdl</expectedFile>
                                    </expectedFiles>
                                </fileSet>
                                <fileSet>
                                    <directory>${project.build.directory}/work/test/wsdl/filegenAll</directory>
                                    <expectedFiles>
                                        <expectedFile>Address.java</expectedFile>
                                        <expectedFile>OpFault.java</expectedFile>
                                        <expectedFile>PortTypeSoap.java</expectedFile>
                                        <expectedFile>ReferenceService.java</expectedFile>
                                        <expectedFile>ReferenceServiceLocator.java</expectedFile>
                                        <expectedFile>ReferenceSoapBindingStub.java</expectedFile>
                                        <expectedFile>StateType.java</expectedFile>
                                    </expectedFiles>
                                </fileSet>
                                <fileSet>
                                    <directory>${project.build.directory}/work/test/wsdl/filegen</directory>
                                    <expectedFiles>
                                        <expectedFile>OpFault.java</expectedFile>
                                        <expectedFile>PortTypeSoap.java</expectedFile>
                                        <expectedFile>ReferenceService.java</expectedFile>
                                        <expectedFile>ReferenceServiceLocator.java</expectedFile>
                                        <expectedFile>ReferenceSoapBindingStub.java</expectedFile>
                                    </expectedFiles>
                                </fileSet>
                                <fileSet>
                                    <directory>${project.build.directory}/work/test/wsdl/groups</directory>
                                    <expectedFiles>
                                        <expectedFile>SomeType.java</expectedFile>
                                    </expectedFiles>
                                </fileSet>
                                <fileSet>
                                    <directory>${project.build.directory}/work/test/wsdl/header</directory>
                                    <expectedFiles>
                                        <expectedFile>BindingImpl.java</expectedFile>
                                        <expectedFile>BindingSkeleton.java</expectedFile>
                                        <expectedFile>BindingStub.java</expectedFile>
                                        <expectedFile>HeaderService.java</expectedFile>
                                        <expectedFile>HeaderServiceLocator.java</expectedFile>
                                        <expectedFile>HeaderServiceTestCase.java</expectedFile>
                                        <expectedFile>HeaderType.java</expectedFile>
                                        <expectedFile>ImplicitFault.java</expectedFile>
                                        <expectedFile>Op1Fault.java</expectedFile>
                                        <expectedFile>PortType.java</expectedFile>
                                        <expectedFile>deploy.wsdd</expectedFile>
                                        <expectedFile>undeploy.wsdd</expectedFile>
                                    </expectedFiles>
                                </fileSet>
                                <fileSet>
                                    <directory>${project.build.directory}/work/test/wsdl/literal</directory>
                                    <expectedFiles>
                                        <expectedFile>SalesRankNPrice1.java</expectedFile>
                                        <expectedFile>SalesRanks.java</expectedFile>
                                        <expectedFile>Prices.java</expectedFile>
                                        <expectedFile>All.java</expectedFile>
                                        <expectedFile>SalesRankNPriceSoap.java</expectedFile>
                                        <expectedFile>SalesRankNPriceSoapStub.java</expectedFile>
                                        <expectedFile>SalesRankNPrice.java</expectedFile>
                                        <expectedFile>SalesRankNPriceLocator.java</expectedFile>
                                    </expectedFiles>
                                </fileSet>
                                <fileSet>
                                    <directory>${project.build.directory}/work/test/wsdl/multibinding</directory>
                                    <expectedFiles>
                                        <expectedFile>BindingAllLitImpl.java</expectedFile>
                                        <expectedFile>BindingAllLitSkeleton.java</expectedFile>
                                        <expectedFile>BindingAllLitStub.java</expectedFile>
                                        <expectedFile>BindingNoLitImpl.java</expectedFile>
                                        <expectedFile>BindingNoLitSkeleton.java</expectedFile>
                                        <expectedFile>BindingNoLitStub.java</expectedFile>
                                        <expectedFile>BindingSomeLitImpl.java</expectedFile>
                                        <expectedFile>BindingSomeLitSkeleton.java</expectedFile>
                                        <expectedFile>BindingSomeLitStub.java</expectedFile>
                                        <expectedFile>MbPT.java</expectedFile>
                                        <expectedFile>MbService.java</expectedFile>
                                        <expectedFile>MbServiceLocator.java</expectedFile>
                                        <expectedFile>MbServiceTestCase.java</expectedFile>
                                        <expectedFile>deploy.wsdd</expectedFile>
                                        <expectedFile>undeploy.wsdd</expectedFile>
                                    </expectedFiles>
                                </fileSet>
                            </fileSets>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <tags>
                        <tag>
                            <name>ant.task</name>
                            <placement>X</placement>
                        </tag>
                    </tags>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
