<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>pl.touk.cxf</groupId>
    <artifactId>cxf-interceptors</artifactId>
    <name>TouK - CXF interceptors</name>
    <description>Utility CXF interceptors</description>
    <version>1.1.0</version>
    <packaging>bundle</packaging>
    <url>https://github.com/TouK/cxf-utils.git</url>

    <properties>
        <generated-java-sources>${project.build.directory}/generated-sources/java</generated-java-sources>
        <cxf.version>3.1.9</cxf.version>
        <lombok.version>1.16.10</lombok.version>
        <spock-core.version>1.1-groovy-2.4</spock-core.version>
        <slf4j.version>1.7.25</slf4j.version>
        <build-helper-maven-plugin.version>1.9.1</build-helper-maven-plugin.version>
        <maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <maven-source-plugin.version>3.0.1</maven-source-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.6</nexus-staging-maven-plugin.version>
        <maven-bundle-plugin.version>3.2.0</maven-bundle-plugin.version>
        <build-helper-maven-plugin.version>1.9.1</build-helper-maven-plugin.version>
        <gmavenplus-plugin.version>1.6</gmavenplus-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-features-logging</artifactId>
            <version>${cxf.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>${cxf.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http-jetty</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>${spock-core.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${maven-bundle-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <failOnError>true</failOnError>
                    <failOnWarning>true</failOnWarning>
                    <obrRepository>NONE</obrRepository>
                    <instructions>
                        <Bundle-Vendor>TouK</Bundle-Vendor>
                        <_removeheaders>Import-Service,Export-Service</_removeheaders>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${cxf.version}</version>
                <executions>
                    <execution>
                        <id>generate-test-sources</id>
                        <phase>generate-test-sources</phase>
                        <configuration>
                            <sourceRoot>${generated-java-sources}</sourceRoot>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>src/test/resources/test.wsdl</wsdl>
                                </wsdlOption>
                            </wsdlOptions>
                        </configuration>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${build-helper-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${generated-java-sources}</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>${gmavenplus-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>addTestSources</goal>
                            <goal>compileTests</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <configuration>
                            <show>private</show>
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <aggregate>true</aggregate>
                            <encoding>UTF-8</encoding>
                            <header>TouK OpenSource Projects</header>
                            <footer>TouK sp. z o.o. s.k.a.</footer>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${maven-release-plugin.version}</version>
                        <configuration>
                            <pushChanges>false</pushChanges>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <scm>
        <url>https://github.com/TouK/cxf-utils.git</url>
        <connection>scm:git:git://github.com/TouK/cxf-utils.git</connection>
        <developerConnection>scm:git:git://github.com/TouK/cxf-utils.git</developerConnection>
        <tag>cxf-interceptors-1.1.0</tag>
    </scm>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>pfs</id>
            <name>Piotr Fus</name>
            <email>pfs@touk.pl</email>
            <organization>TouK</organization>
            <organizationUrl>https://touk.pl</organizationUrl>
        </developer>
        <developer>
            <id>dpr</id>
            <name>Dominik Przybysz</name>
            <email>dpr@touk.pl</email>
            <organization>TouK</organization>
            <organizationUrl>https://touk.pl</organizationUrl>
        </developer>
        <developer>
            <id>krf</id>
            <name>Kamil Rafałko</name>
            <email>krf@touk.pl</email>
            <organization>TouK</organization>
            <organizationUrl>https://touk.pl</organizationUrl>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
</project>
