<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.ws.commons.axiom</groupId>
        <artifactId>testing</artifactId>
        <version>1.4.0</version>
    </parent>

    <artifactId>jaxp-testsuite</artifactId>

    <url>http://ws.apache.org/axiom/</url>

    <properties>
        <javaVersion>9</javaVersion>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>multiton</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>stax2-api</artifactId>
        </dependency>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>9.9.1-8</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
        </dependency>
        <dependency>
            <groupId>crimson</groupId>
            <artifactId>crimson</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>${project.build.directory}/generated-resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.codehaus.woodstox</groupId>
                                    <artifactId>woodstox-core-asl</artifactId>
                                    <version>4.4.1</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.fasterxml.woodstox</groupId>
                                    <artifactId>woodstox-core</artifactId>
                                    <version>5.3.0</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.fasterxml.woodstox</groupId>
                                    <artifactId>woodstox-core</artifactId>
                                    <version>6.2.6</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.sun.xml.stream</groupId>
                                    <artifactId>sjsxp</artifactId>
                                    <version>1.0.1</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>stax</groupId>
                                    <artifactId>stax</artifactId>
                                    <version>1.2.0</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/generated-resources/org/apache/axiom/ts/jaxp/stax</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <scripts>
                                <script><![CDATA[
                                    def dir = new File(project.build.directory, "generated-resources/org/apache/axiom/ts/jaxp/stax");
                                    def filelist = new File(dir, "filelist");
                                    filelist.delete();
                                    dir.eachFile({
                                        if (it.file && it.name.endsWith(".jar")) {
                                            filelist.append("$it.name\n");
                                        }
                                    })
                                ]]></script>
                            </scripts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
