<?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>eu.portcdm</groupId>
    <artifactId>pcmf</artifactId>
    <version>0.6</version>
    <packaging>jar</packaging>

    <name>PortCDM Port Call Message Format</name>
    <description>Schema files and generated artifacts for implementing the Port Call Message Format as defined by th PortCDM Council</description>
    <url>http://devtool.portcdm.eu</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Eddie Olsson</name>
            <email>eddie.olsson@ri.se</email>
            <organization>RISE Viktoria AB</organization>
            <organizationUrl>http://www.viktoria.se</organizationUrl>
        </developer>
        <developer>
            <name>Isak Lindbeck</name>
            <email>isak.lindbeck@ri.se</email>
            <organization>RISE Viktoria AB</organization>
            <organizationUrl>http://www.viktoria.se</organizationUrl>
        </developer>
        <developer>
            <name>Sebastian Karlsoon</name>
            <email>sebastian.karlsson@ri.se</email>
            <organization>RISE Viktoria AB</organization>
            <organizationUrl>http://www.viktoria.se</organizationUrl>
        </developer>
        <developer>
            <name>Axel Pelling</name>
            <email>axel.pellingn@ri.se</email>
            <organization>RISE Viktoria AB</organization>
            <organizationUrl>http://www.viktoria.se</organizationUrl>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <swagger-maven-plugin-version>3.1.0</swagger-maven-plugin-version>
    </properties>

    <scm>
        <connection>scm:git:http://devtools.portcdm.eu/stash/scm/sv/port-call-message-format.git</connection>
        <developerConnection>scm:git:ssh://git@devtools.portcdm.eu:7999/sv/port-call-message-format.git</developerConnection>
        <url>http://devtools.portcdm.eu/stash/projects/SV/repos/port-call-message-format</url>
    </scm>

    <build>
        <resources>
            <resource>
                <directory>src/main/xsd</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>current</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <!-- The package of your generated sources -->
                            <packageName>eu.portcdm.messaging</packageName>
                            <sources>
                                <source>src/main/xsd/v0.6/port-call-message.xsd</source>
                            </sources>
                            <xjbSources>
                                <xjbSource>src/main/xjb-bindings/port-call-message_0.6.xjb</xjbSource>
                            </xjbSources>

                        </configuration>
                    </execution>
                    <execution>
                        <id>legacy_0.0.17</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <!-- The package of your generated sources -->
                            <packageName>eu.portcdm.messaging.v0_0_17</packageName>
                            <sources>
                                <source>src/main/xsd/port-call-message_0.0.17.xsd</source>
                            </sources>
                            <xjbSources>
                                <xjbSource>src/main/xjb-bindings/port-call-message_0.0.17.xjb</xjbSource>
                            </xjbSources>
                            <clearOutputDir>false</clearOutputDir>
                        </configuration>
                    </execution>
                    <execution>
                        <id>legacy_0.0.16</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <!-- The package of your generated sources -->
                            <packageName>eu.portcdm.messaging.v0_0_16</packageName>
                            <sources>
                                <source>src/main/xsd/port-call-message_0.0.16.xsd</source>
                            </sources>
                            <clearOutputDir>false</clearOutputDir>
                        </configuration>
                    </execution>
                    <execution>
                        <id>legacy_0.0.15</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <!-- The package of your generated sources -->
                            <packageName>eu.portcdm.messaging.v0_0_15</packageName>
                            <sources>
                                <source>src/main/xsd/port-call-message_0.0.15.xsd</source>
                            </sources>
                            <clearOutputDir>false</clearOutputDir>
                        </configuration>
                    </execution>
                    <execution>
                        <id>legacy_0.0.14</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <!-- The package of your generated sources -->
                            <packageName>eu.portcdm.messaging.v0_0_14</packageName>
                            <sources>
                                <source>src/main/xsd/port-call-message_0.0.14.xsd</source>
                            </sources>
                            <clearOutputDir>false</clearOutputDir>
                        </configuration>
                    </execution>
                    <execution>
                        <id>legacy_0.0.11</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                        <configuration>
                            <!-- The package of your generated sources -->
                            <packageName>eu.portcdm.messaging.v0_0_11</packageName>
                            <sources>
                                <source>src/main/xsd/port-call-message_0.0.11.xsd</source>
                            </sources>
                            <clearOutputDir>false</clearOutputDir>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- For Maven Central -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- To build dummy sources and javadoc archives -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <executions>
                    <execution>
                        <id>sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>sources</classifier>
                            <includes>
                                <include>README.nothing_here</include>
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>javadoc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>javadoc</classifier>
                            <includes>
                                <include>README.nothing_here</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.2</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jaxb2-maven-plugin</artifactId>
                    <version>2.1</version><!-- Tried 2.2, which was the latest at this time, but it bugged out -->
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>maven-central-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>maven-central</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
    </distributionManagement>

</project>
