<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Distribution License v. 1.0, which is available at
    http://www.eclipse.org/org/documents/edl-v10.php.

    SPDX-License-Identifier: BSD-3-Clause

-->

<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>
        <artifactId>metro-project</artifactId>
        <groupId>org.glassfish.metro</groupId>
        <version>4.0.0-M2</version>
    </parent>

    <artifactId>docs</artifactId>
    <packaging>pom</packaging>
    <name>Metro Documentation</name>

    <modules>
        <module>guide</module>
        <module>getting-started</module>
    </modules>

    <profiles>
        <profile>
            <id>release-docs</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-antrun-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>checkin-docbook</id>
                                    <phase>install</phase>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <configuration>
                                        <tasks>
                                            <taskdef name="soimp" classname="com.sun.istack.soimp.Soimp" classpathref="maven.plugin.classpath" />

                                            <copy todir="${www.upload.dir}">
                                                <fileset dir="${project.build.directory}/docbook">
                                                    <exclude name="*.fo" />
                                                </fileset>
                                            </copy>

                                            <!-- update the latest docbook-version -->

                                            <!-- soimp  dir="${www.upload.dir}"
                                                    repository="${www.repository.url}"
                                                    username="${userguide.scm.username}"
                                                    password="${userguide.scm.password}"
                                                    create="true"
                                                    additionalOptions="no-auth-cache"
                                                    commitMessage="${project.artifactId}-${project.version}" / -->
                                        </tasks>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>com.sun.istack</groupId>
                                    <artifactId>istack-commons-soimp</artifactId>
                                    <version>2.10</version>
                                </dependency>
                                <dependency>
                                    <groupId>args4j</groupId>
                                    <artifactId>args4j</artifactId>
                                    <version>2.0.1</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>

</project>
