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

    <name>Posten signering - API JAXB Classes</name>

    <artifactId>signature-api-specification-jaxb</artifactId>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <xsd.directory>${project.basedir}/target/generated-resources/xsd</xsd.directory>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics-runtime</artifactId>
            <version>0.11.1</version>
        </dependency>
        <dependency>
            <groupId>no.digipost.signature</groupId>
            <artifactId>signature-api-specification</artifactId>
            <version>${project.version}</version>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>4.3.4.RELEASE</version>
            <optional>true</optional>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
            <version>4.3.4.RELEASE</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.7.21</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.21</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                </plugin>
                <plugin>
                    <groupId>org.jvnet.jaxb2.maven2</groupId>
                    <artifactId>maven-jaxb2-plugin</artifactId>
                    <version>0.13.1</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jasig.maven</groupId>
                    <artifactId>maven-notice-plugin</artifactId>
                    <configuration>
                        <noticeTemplate>${project.basedir}/../src/notice/NOTICE.template</noticeTemplate>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>true</failOnWarning>
                            <ignoreNonCompile>true</ignoreNonCompile>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-xsd-resources</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>signature-api-specification</includeArtifactIds>
                            <outputDirectory>${xsd.directory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludePackageNames>no.digipost.signature.api.xml.thirdparty.xmldsig</excludePackageNames>
                    <additionalparam>-Xdoclint:-missing</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <includePom>true</includePom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>commons-logging</exclude>
                                    </excludes>
                                    <searchTransitive>true</searchTransitive>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <specVersion>2.2</specVersion>
                    <schemaDirectory>${xsd.directory}</schemaDirectory>
                    <schemaIncludes>
                        <include>direct-and-portal.xsd</include>
                        <include>thirdparty/*.xsd</include>
                    </schemaIncludes>
                    <catalog>${xsd.directory}/catalog.xml</catalog>
                    <strict>false</strict>
                    <extension>true</extension>
                    <removeOldOutput>true</removeOldOutput>
                    <bindingDirectory>${project.basedir}/src/main/jaxb</bindingDirectory>
                    <args>
                        <arg>-Xxew</arg>
                        <arg>-Xxew:instantiate lazy</arg>
                        <arg>-Xxew:control ${project.basedir}/src/main/jaxb/xew-control.properties</arg>
                        <arg>-XtoString</arg>
                        <arg>-Xjavadoc</arg>
                        <arg>-Xvalue-constructor</arg>
                        <arg>-Xfluent-api</arg>
                        <arg>-Xinheritance</arg>
                    </args>
                    <plugins>
                        <plugin>
                            <groupId>org.jvnet.jaxb2_commons</groupId>
                            <artifactId>jaxb2-basics</artifactId>
                            <version>0.11.1</version>
                        </plugin>
                        <plugin>
                            <groupId>org.jvnet.jaxb2_commons</groupId>
                            <artifactId>jaxb2-fluent-api</artifactId>
                            <version>3.0</version>
                        </plugin>
                        <plugin>
                            <groupId>org.jvnet.jaxb2_commons</groupId>
                            <artifactId>jaxb2-value-constructor</artifactId>
                            <version>3.0</version>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.cxf.xjcplugins</groupId>
                            <artifactId>cxf-xjc-javadoc</artifactId>
                            <version>3.0.5</version>
                        </plugin>
                        <plugin>
                            <groupId>com.github.jaxb-xew-plugin</groupId>
                            <artifactId>jaxb-xew-plugin</artifactId>
                            <version>1.8</version>
                        </plugin>
                    </plugins>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <parent>
        <groupId>no.digipost.signature</groupId>
        <artifactId>signature-api-specification-parent</artifactId>
        <version>2.2</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

</project>
