<!--
  ~ Licensed under the EUPL, Version 1.2 or - as soon they will be approved by
  ~ the European Commission - subsequent versions of the EUPL (the "Licence");
  ~ You may not use this work except in compliance with the Licence.
  ~ You may obtain a copy of the Licence at:
  ~
  ~   https://joinup.ec.europa.eu/software/page/eupl
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the Licence is distributed on an "AS IS" basis,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the Licence for the specific language governing permissions and
  ~ limitations under the Licence.
  -->

<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.entur</groupId>
    <artifactId>netex-java-model</artifactId>
    <version>2.0.15.2</version>

    <name>netex-java-model</name>
    <description>Generates Java model from NeTEx XSDs using JAXB.</description>
    <url>https://github.com/entur/netex-java-model</url>
    <organization>
        <name>Entur AS</name>
        <url>https://www.entur.org/</url>
    </organization>
    <licenses>
        <license>
            <name>EUPL-1.2 with modifications</name>
            <url>https://joinup.ec.europa.eu/software/page/eupl</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Erlend Nossum</name>
            <email>erlend.nossum@entur.org</email>
            <organization>Entur</organization>
            <organizationUrl>https://www.entur.org</organizationUrl>
        </developer>
        <developer>
            <name>Cristoffer Solem</name>
            <email>cristoffer.solem@entur.org</email>
            <organization>Entur</organization>
            <organizationUrl>https://www.entur.org</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:ssh://git@github.com/entur/netex-java-model.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/entur/netex-java-model.git</developerConnection>
        <url>https://github.com/entur/netex-java-model/tree/v2.0.15.2</url>
        <tag>HEAD</tag>
    </scm>
    <distributionManagement>
        <snapshotRepository>
            <id>snapshots</id>
            <name>entur2-snapshots</name>
            <url>https://entur2.jfrog.io/entur2/libs-snapshot-local</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- Do not edit, this is automatically updated by the Maven release plugin -->
        <project.build.outputTimestamp>2023-11-01T10:18:06Z</project.build.outputTimestamp>
        <jdk.version>11</jdk.version>

        <netexRepoName>NeTEx</netexRepoName>
        <netexBranch>master</netexBranch>
        <netexGithubUrl>https://github.com/entur/${netexRepoName}</netexGithubUrl>
        <netexVersion>1.15.2</netexVersion>

        <!-- JAXB components versions -->
        <jakarta-xml-bind.version>4.0.0</jakarta-xml-bind.version>
        <glassfish-jaxb.version>4.0.4</glassfish-jaxb.version>
        <jaxb.fluent.api.version>2.1.8</jaxb.fluent.api.version>
        <threeten-jaxb-core.version>2.1.0</threeten-jaxb-core.version>

        <cxf.xjc.plugin.version>4.0.0</cxf.xjc.plugin.version>
        <cxf-xjc.version>4.0.0</cxf-xjc.version>

        <!-- Other dependencies versions -->
        <slf4j.version>2.0.9</slf4j.version>
        <commons-lang3.version>3.13.0</commons-lang3.version>

        <!-- Unit test frameworks versions -->
        <assertj.core.version>3.24.2</assertj.core.version>
        <junit.version>5.10.0</junit.version>

        <!-- Maven plugin versions  -->
        <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
        <maven-exec-plugin.version>3.1.0</maven-exec-plugin.version>
        <maven-surefire-plugin.version>3.2.1</maven-surefire-plugin.version>
        <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
        <maven-release-plugin.version>3.0.1</maven-release-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
        <maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
        <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>

        <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
        <maven-clean-plugin.version>3.3.2</maven-clean-plugin.version>
        <maven-install-plugin.version>3.1.1</maven-install-plugin.version>
        <maven-site-plugin.version>3.12.1</maven-site-plugin.version>
        <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
        <git-commit-id-maven-plugin.version>9.0.2</git-commit-id-maven-plugin.version>
        <jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
        <sonar-maven-plugin.version>5.5.0.6356</sonar-maven-plugin.version>
        <jreleaser-maven-plugin.version>1.18.0</jreleaser-maven-plugin.version>

        <!-- empty argLine property, the value is set up by Jacoco during unit tests execution -->
        <argLine />

    </properties>

    <dependencies>

        <!-- JAXB -->
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <version>${jakarta-xml-bind.version}</version>
        </dependency>
        <dependency>
            <groupId>io.github.threeten-jaxb</groupId>
            <artifactId>threeten-jaxb-core</artifactId>
            <version>${threeten-jaxb-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <version>${glassfish-jaxb.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf.xjc-utils</groupId>
            <artifactId>cxf-xjc-runtime</artifactId>
            <version>${cxf-xjc.version}</version>
            <scope>runtime</scope>
        </dependency>

        <!-- Other dependencies -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons-lang3.version}</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.core.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <!-- maven3 will need wagon-ssh extension in order to be able to release,
            Using external variant in order to retain keys, etc -->
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh-external</artifactId>
                <version>2.12</version>
            </extension>
        </extensions>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven-clean-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.jreleaser</groupId>
                    <artifactId>jreleaser-maven-plugin</artifactId>
                    <version>${jreleaser-maven-plugin.version}</version>
                    <configuration>
                        <jreleaser>
                            <signing>
                                <active>ALWAYS</active>
                                <armored>true</armored>
                            </signing>
                            <deploy>
                                <maven>
                                    <mavenCentral>
                                        <sonatype>
                                            <active>RELEASE</active>
                                            <url>https://central.sonatype.com/api/v1/publisher</url>
                                            <stagingRepositories>target/staging-deploy</stagingRepositories>
                                        </sonatype>
                                    </mavenCentral>
                                    <nexus2>
                                        <maven-central>
                                            <active>SNAPSHOT</active>
                                            <url>https://ossrh-staging-api.central.sonatype.com/service/local</url>
                                            <snapshotUrl>https://central.sonatype.com/repository/maven-snapshots</snapshotUrl>
                                            <applyMavenCentralRules>true</applyMavenCentralRules>
                                            <snapshotSupported>true</snapshotSupported>
                                            <closeRepository>true</closeRepository>
                                            <releaseRepository>true</releaseRepository>
                                            <stagingRepositories>target/staging-deploy</stagingRepositories>
                                        </maven-central>
                                    </nexus2>
                                </maven>
                            </deploy>
                            <release>
                                <github>
                                    <skipTag>false</skipTag>
                                    <skipRelease>true</skipRelease>
                                </github>
                            </release>
                        </jreleaser>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>${maven-exec-plugin.version}</version>
                <executions>

                        <!-- This is the current version which the model is built from. -->
                    <execution>
                    <id>download-extract-current-version</id>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <configuration>
                        <environmentVariables>
                            <GITHUB_URL>${netexGithubUrl}/archive/${netexBranch}.zip</GITHUB_URL>
                            <DESTINATION_PATH>src/main/resources/xsd/${netexVersion}</DESTINATION_PATH>
                            <ZIP_PATH_TO_EXTRACT>NeTEx-${netexBranch}/xsd/*</ZIP_PATH_TO_EXTRACT>
                        </environmentVariables>
                        <executable>./bin/netex-download-extract.sh</executable>
                    </configuration>
                </execution>
                    <execution>
                        <id>replace-hard-coded-id-in-bindings-file</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <arguments>
                                <argument>${netexVersion}</argument>
                            </arguments>
                            <executable>
                                ./bin/version_updater.sh
                            </executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.15.1 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.15.1</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.15.1.zip</GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.15.1</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.15.1/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.15 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.15</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.15.zip</GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.15</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.15/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                    <!-- This downloads 1.14 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.14</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.14.zip</GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.14</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.14/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.13 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.13</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.13.zip</GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.13</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.13/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.12 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.12</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.12.zip</GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.12</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.12/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.11 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.11</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.11.zip</GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.11</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.11/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.10 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.10</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.10-entur.zip</GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.10</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.10-entur/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.09 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.09</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.9.zip</GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.09</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.9/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.08 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.08</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>${netexGithubUrl}/archive/tags/v1.0.8.zip</GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.08</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-tags-v1.0.8/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.07 for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.07</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>https://raw.githubusercontent.com/entur/NeTEx/master/archive/1.07.zip
                                </GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.07</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-XML-deprecated-1.07/schema/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- This downloads 1.04beta for validation needs. This is not used to generate the model -->
                        <id>download-extract-legacy-1.04beta</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <GITHUB_URL>https://raw.githubusercontent.com/entur/NeTEx/master/archive/1.04beta.zip
                                </GITHUB_URL>
                                <DESTINATION_PATH>src/main/resources/xsd/1.04beta</DESTINATION_PATH>
                                <ZIP_PATH_TO_EXTRACT>NeTEx-XML-deprecated-1.04beta/schema/xsd/*</ZIP_PATH_TO_EXTRACT>
                            </environmentVariables>
                            <executable>./bin/netex-download-extract.sh</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <id>annotation-removal</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <arguments>
                                <argument>${netexVersion}</argument>
                            </arguments>
                            <executable>./bin/annotation-replacer.sh</executable>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-xjc-plugin</artifactId>
                <version>${cxf.xjc.plugin.version}</version>
                <configuration>
                    <extensions>
                        <extension>net.java.dev.jaxb2-commons:jaxb-fluent-api:${jaxb.fluent.api.version}</extension>
                        <extension>org.apache.cxf.xjcplugins:cxf-xjc-ts:${cxf-xjc.version}</extension>
                    </extensions>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-sources-for-netex</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>xsdtojava</goal>
                        </goals>
                        <configuration>
                            <!--
                            The cxf-xjc-plugin default source root is not following the standard Maven convention:
                            "target/generated-sources/<tool-name>". So we override the default to follow the Maven
                            convention. This makes it easier for other tools like Intellij and Eclipse to auto
                            detect the generated source.
                             -->
                            <sourceRoot>${project.build.directory}/generated-sources/xjc</sourceRoot>
                            <xsdOptions>
                                <xsdOption>
                                    <xsd>
                                        ${basedir}/src/main/resources/xsd/${netexVersion}/NeTEx_publication.xsd
                                    </xsd>
                                    <extension>true</extension>
                                    <bindingFile>bindings.xjb</bindingFile>
                                    <extensionArgs>
                                        <extensionArg>-no-header</extensionArg>
                                        <extensionArg>-Xbug986</extensionArg>
                                        <extensionArg>-Xfluent-api</extensionArg>
                                        <extensionArg>-Xts:style:org.rutebanken.netex.OmitNullsToStringStyle.INSTANCE
                                        </extensionArg>
                                    </extensionArgs>
                                </xsdOption>
                            </xsdOptions>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.cxf.xjcplugins</groupId>
                        <artifactId>cxf-xjc-bug986</artifactId>
                        <version>${cxf.xjc.plugin.version}</version>
                    </dependency>
                 </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <encoding>UTF-8</encoding>
                    <compilerArgs>
                        <!--arg>-Werror</arg-->
                        <arg>-Xlint:all</arg>
                    </compilerArgs>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-compiler-javac</artifactId>
                        <version>2.13.0</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release,sign,!noPublicDeploy</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>2.0.1</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven-enforcer-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>${jdk.version}</version>
                                </requireJavaVersion>
                                <requirePluginVersions />
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <argLine>@{argLine} -Xms500m -Xmx500m -Xss512k</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules />
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Automatic-Module-Name>org.entur.netex.java.model</Automatic-Module-Name>
                            <Last-Commit-Id>${git.commit.id}</Last-Commit-Id>
                            <Last-Commit-Time>${git.commit.time}</Last-Commit-Time>
                            </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.github.git-commit-id</groupId>
                <artifactId>git-commit-id-maven-plugin</artifactId>
                <version>${git-commit-id-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <verbose>false</verbose>
                    <dateFormat>yyyy-MM-dd'T'HH:mm:ssXXX</dateFormat>
                    <includeOnlyProperties>
                        <includeOnlyProperty>git.commit.id</includeOnlyProperty>
                        <includeOnlyProperty>git.commit.time</includeOnlyProperty>
                    </includeOnlyProperties>
                </configuration>
            </plugin>
            <!-- Declare JReleaser plugin so it can be invoked at parent level -->
            <plugin>
                <groupId>org.jreleaser</groupId>
                <artifactId>jreleaser-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>sonar</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>

            <properties>
                <jdk.version>11</jdk.version>
                <sonar-maven-plugin.version>3.9.1.2184</sonar-maven-plugin.version>
            </properties>

            <build>
                    <plugins>

                        <plugin>
                        <groupId>org.sonarsource.scanner.maven</groupId>
                        <artifactId>sonar-maven-plugin</artifactId>
                        <version>${sonar-maven-plugin.version}</version>
                        </plugin>
                    </plugins>
            </build>
        </profile>
        <profile>
            <id>publication</id>
            <properties>
                <altDeploymentRepository>local::default::file:./target/staging-deploy</altDeploymentRepository>
            </properties>
            <build>
                <defaultGoal>deploy</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <attach>true</attach>
                                </configuration>
                            </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>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                        <configuration>
                                    <attach>true</attach>
                        </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
