<!--
    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>
    <groupId>org.apache.cxf.site-export</groupId>
    <artifactId>cxf-site-export</artifactId>
    <packaging>jar</packaging>
    <version>1.1-SNAPSHOT</version>
    <name>Apache CXF Confluence Site Exporter</name>
    <url>http://cxf.apache.org</url>


    <properties>
        <enforcer.skip>true</enforcer.skip>
        <cxf.version>3.5.0</cxf.version>
        <extra.arg></extra.arg>
        <svn.arg1></svn.arg1>
        <svn.arg2></svn.arg2>
        <site.output>${basedir}/content</site.output>
        <cxf.site.output>${site.output}</cxf.site.output>
        <cxf.velocity.version>2.3</cxf.velocity.version>
        <!--maven.test.skip>true</maven.test.skip-->
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-client</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-features-clustering</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity-engine-core</artifactId>
            <version>${cxf.velocity.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ccil.cowan.tagsoup</groupId>
            <artifactId>tagsoup</artifactId>
            <version>1.2.1</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.5.4</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>8</source>
                        <target>8</target>
                        <maxmem>256M</maxmem>
                        <fork>true</fork>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.2</version>
                    <configuration>
                        <mainClass>org.apache.cxf.cwiki.SiteExporter</mainClass>
                        <arguments>
                            <argument>-d</argument>
                            <argument>${cxf.site.output}</argument>
                            <argument>-password</argument>
                            <argument>${confluence.password}</argument>
                            <argument>-user</argument>
                            <argument>${confluence.user}</argument>
                            <argument>${extra.arg}</argument>
                            <argument>${svn.arg1}</argument>
                            <argument>${svn.arg2}</argument>
                            <!--argument>-force</argument-->
                            <argument>${basedir}/template/main.cfg</argument>
                            <argument>${basedir}/template/docs.cfg</argument>
                        </arguments>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-wadl2java-plugin</artifactId>
                <version>${cxf.version}</version>
                <executions>
                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <configuration>
                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                            <wadlOptions>
                                <wadlOption>
                                    <wadl>${basedir}/src/main/resources/confluence-rest.wadl</wadl>
                                </wadlOption>
                            </wadlOptions>
                        </configuration>
                        <goals>
                            <goal>wadl2java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <distributionManagement>
        <repository>
            <id>apache.releases.https</id>
            <name>Apache Release Distribution Repository</name>
            <url>https://repository.apache.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>apache.snapshots.https</id>
            <name>Apache Development Snapshot Repository</name>
            <url>https://repository.apache.org/content/repositories/snapshots</url>
            <!--uniqueVersion>false</uniqueVersion-->
        </snapshotRepository>
        <site>
            <id>apache.cxf.site</id>
            <url>${site.deploy.url}</url>
        </site>
    </distributionManagement>
    <repositories>
        <repository>
            <id>central</id>
            <url>https://repo1.maven.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>central</name>
            <url>https://repo1.maven.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <profiles>
        <profile>
            <id>svn</id>
            <properties>
                <svn.arg1>-svn</svn.arg1>
                <svn.arg2>-commit</svn.arg2>
            </properties>
        </profile>
        <profile>
            <id>forceAll</id>
            <properties>
                <extra.arg>-force</extra.arg>
            </properties>
        </profile>
    </profiles>
</project>
