<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>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>org.humanistika.oxygen</groupId>
    <artifactId>tei-completer</artifactId>
    <version>1.2.2</version>

    <name>TEI Completer</name>
    <description>An Oxygen XML Editor plugin for customizable attribute and value completion for TEI P5 documents</description>
    <url>https://github.com/BCDH/TEI-Completer</url>
    <inceptionYear>2016</inceptionYear>

    <organization>
        <name>Belgrade Center for Digital Humanities</name>
        <url>https://www.humanistika.org</url>
    </organization>

    <developers>
        <developer>
            <name>Adam Retter</name>
            <organization>Evolved Binary</organization>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Younes Bahloul</name>
            <organization>Evolved Binary</organization>
        </contributor>
    </contributors>

    <licenses>
        <license>
            <name>GNU General Public License, version 2</name>
            <url>https://opensource.org/licenses/gpl-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/BCDH/TEI-Completer.git</connection>
        <developerConnection>scm:git:https://github.com/BCDH/TEI-Completer.git</developerConnection>
        <url>scm:git:https://github.com/BCDH/TEI-Completer.git</url>
      <tag>1.2.2</tag>
  </scm>

    <properties>
        <oxygen.sdk.version>25.1.0.2</oxygen.sdk.version>
        <jersey.version>2.40</jersey.version>
        <slf4j.version>2.0.9</slf4j.version>
        <jaxb2-basics.version>0.13.1</jaxb2-basics.version>
        <eclipse.persistence.version>2.7.10</eclipse.persistence.version>
        <junit.jupiter.version>5.9.3</junit.jupiter.version>
        <project.build.source>11</project.build.source>
        <project.build.target>11</project.build.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <enforce.release.jdk-version>(11,17)</enforce.release.jdk-version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.2</version>
        </dependency>
        <dependency>
            <groupId>com.oxygenxml</groupId>
            <artifactId>oxygen</artifactId>
            <version>${oxygen.sdk.version}</version>
            <scope>provided</scope>  <!-- provided by Oxygen -->
        </dependency>
        <dependency>
            <!-- NOTE(AR) needed for Javadoc generation to succeed -->
            <groupId>com.oxygenxml</groupId>
            <artifactId>oxygen-annotations</artifactId>
            <version>${oxygen.sdk.version}</version>
            <scope>provided</scope>  <!-- provided by Oxygen -->
        </dependency>
        <dependency>
            <groupId>org.mozilla</groupId>
            <artifactId>rhino</artifactId>
            <version>1.7.14</version>
            <scope>provided</scope>  <!-- provided by Oxygen -->
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>11.4</version>
            <scope>provided</scope>  <!-- provided by Oxygen -->
        </dependency>
        <dependency>
            <groupId>com.evolvedbinary.xpath</groupId>
            <artifactId>xpath2-parser</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <version>2.3.3</version>
            <scope>provided</scope> <!-- provided by Oxygen -->
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.3.3</version>
            <scope>provided</scope>  <!-- provided by Oxygen -->
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.moxy</artifactId>
            <version>${eclipse.persistence.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.core</artifactId>
            <version>${eclipse.persistence.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>${jersey.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-common</artifactId>
            <version>${jersey.version}</version>
        </dependency>
        <dependency>
            <!-- needed for both `runtime` scope for `jersey-common` and
            `test` scope for our code. If we don't have this the `test` scope alone
            causes it to be excluded from the shaded Jar -->
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <version>1.3.5</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-jaxb</artifactId>
            <version>${jersey.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-moxy</artifactId>
            <version>${jersey.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.inject</groupId>
            <artifactId>jersey-hk2</artifactId>
            <version>${jersey.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.json</artifactId>
            <version>1.1.2</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta.ws.rs-api</artifactId>
            <version>2.1.6</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <!-- required for auto-generated equals(Object obj) method in JAXB objects -->
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics-runtime</artifactId>
            <version>${jaxb2-basics.version}</version>
        </dependency>

        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>1.4.01</version>
            <scope>provided</scope>  <!-- provided by Oxygen -->
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>runtime</scope>
        </dependency> <!-- log4j is provided by Oxygen -->

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.test-framework</groupId>
            <artifactId>jersey-test-framework-core</artifactId>
            <version>${jersey.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.test-framework.providers</groupId>
            <artifactId>jersey-test-framework-provider-inmemory</artifactId>
            <version>${jersey.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-server</artifactId>
            <version>${jersey.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.14</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                    <header>GPL2-template.txt</header>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
                    <strictCheck>true</strictCheck>
                    <properties>
                        <organization>${project.organization.name}</organization>
                    </properties>
                    <excludes>
                        <exclude>.github/**</exclude>
                        <exclude>**/pom.xml</exclude>
                        <exclude>**/README.md</exclude>
                        <exclude>**/LICENSE</exclude>
                        <exclude>src/main/resources/**</exclude>
                        <exclude>src/test/resources/**</exclude>
                    </excludes>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
                <executions>
                    <execution>
                        <id>check-headers</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.evolvedbinary.maven.jvnet</groupId>
                <artifactId>jaxb23-maven-plugin</artifactId>
                <version>0.15.0</version>
                <configuration>
                    <extension>true</extension>
                    <args>
                        <arg>-Xequals</arg>
                    </args>
                    <plugins>
                        <plugin>
                            <groupId>org.jvnet.jaxb2_commons</groupId>
                            <artifactId>jaxb2-basics</artifactId>
                            <version>${jaxb2-basics.version}</version>
                        </plugin>
                    </plugins>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <id>analyze</id>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>true</failOnWarning>
                            <!-- ignore various runtime dependency warnings -->
                            <ignoredUnusedDeclaredDependencies>
                                <ignoredUnusedDeclaredDependency>com.oxygenxml:oxygen-annotations</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>net.sf.saxon:Saxon-HE</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-inmemory</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.slf4j:slf4j-log4j12</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.glassfish.jersey.media:jersey-media-jaxb</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.glassfish.jersey.inject:jersey-hk2</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.glassfish:javax.json</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>com.sun.xml.bind:jaxb-impl</ignoredUnusedDeclaredDependency>
                                <ignoredUnusedDeclaredDependency>org.junit.jupiter:junit-jupiter-engine</ignoredUnusedDeclaredDependency>
                            </ignoredUnusedDeclaredDependencies>
                            <ignoredNonTestScopedDependencies>
                                <ignoredNonTestScopedDependency>jakarta.annotation:jakarta.annotation-api</ignoredNonTestScopedDependency>
                            </ignoredNonTestScopedDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.code54.mojo</groupId>
                <artifactId>buildversion-plugin</artifactId>
                <version>1.0.3</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>set-properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <source>${project.build.source}</source>
                    <target>${project.build.target}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <compilerArgs>
                        <compilerArg>-Xlint:unchecked</compilerArg>
                        <compilerArg>-Xlint:deprecation</compilerArg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.2.3</version>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-engine</artifactId>
                        <version>${junit.jupiter.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Build-Tag>${build-tag}</Build-Tag>
                            <Git-Commit>${build-commit}</Git-Commit>
                            <Git-Commit-Abbrev>${build-commit-abbrev}</Git-Commit-Abbrev>
                            <Git-Commit-Timestamp>${build-tstamp}</Git-Commit-Timestamp>
                            <Build-Version>${build-version}</Build-Version>
                            <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                            <Source-Repository>${project.scm.connection}</Source-Repository>
                            <Description>${project.description}</Description>
                            <Implementation-URL>${project.url}</Implementation-URL>
                            <License>GNU General Public License, version 2</License>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>oxygen-plugin</shadedClassifierName>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <artifactSet>
                                <excludes>
                                    <!-- Oxygen already ships with a version of these, so we needn't package them as well -->
                                    <exclude>log4j:log4j</exclude>
                                    <exclude>net.sf.saxon:Saxon-HE</exclude>
                                </excludes>
                            </artifactSet>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer" />
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
                                    <addHeader>false</addHeader>
                                </transformer>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                                    <resource>META-INF/LICENSE</resource>
                                    <file>LICENSE</file>
                                </transformer>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                                    <resource>META-INF/README.md</resource>
                                    <file>README.md</file>
                                </transformer>
                            </transformers>
                            <filters>
                                <filter>
                                    <artifact>org.eclipse.persistence:*</artifact>
                                    <excludes>
                                        <exclude>*.html</exclude>
                                    </excludes>
                                </filter>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- Attach source jars -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Build-Tag>${build-tag}</Build-Tag>
                            <Git-Commit>${build-commit}</Git-Commit>
                            <Git-Commit-Abbrev>${build-commit-abbrev}</Git-Commit-Abbrev>
                            <Git-Commit-Timestamp>${build-tstamp}</Git-Commit-Timestamp>
                            <Build-Version>${build-version}</Build-Version>
                            <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                            <Source-Repository>${project.scm.connection}</Source-Repository>
                            <Description>${project.description}</Description>
                            <Implementation-URL>${project.url}</Implementation-URL>
                            <License>GNU General Public License, version 2</License>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.6.3</version>
                <configuration>
                    <source>${project.build.source}</source>

                    <!-- Workaround for - generated-sources/xjc/org/humanistika/ns/tei_completer/package-info.java:8: error: unknown tag: javax.xml.bind.annotation.XmlSchema -->
                    <excludePackageNames>org.humanistika.ns.tei_completer</excludePackageNames>

                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Build-Tag>${build-tag}</Build-Tag>
                            <Git-Commit>${build-commit}</Git-Commit>
                            <Git-Commit-Abbrev>${build-commit-abbrev}</Git-Commit-Abbrev>
                            <Git-Commit-Timestamp>${build-tstamp}</Git-Commit-Timestamp>
                            <Build-Version>${build-version}</Build-Version>
                            <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                            <Source-Repository>${project.scm.connection}</Source-Repository>
                            <Description>${project.description}</Description>
                            <Implementation-URL>${project.url}</Implementation-URL>
                            <License>GNU General Public License, version 2</License>
                        </manifestEntries>
                    </archive>
                    <additionalJOptions>
                        <additionalJOption>-Xmaxerrs</additionalJOption>
                        <additionalJOption>65536</additionalJOption>
                        <additionalJOption>-Xmaxwarns</additionalJOption>
                        <additionalJOption>65536</additionalJOption>
                    </additionalJOptions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.4.1</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>${enforce.release.jdk-version}</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId> <!-- avoid a bug with GPG plugin hanging https://jira.codehaus.org/browse/MGPG-9 -->
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>oxygen</id>
            <name>oXygen public artifacts</name>
            <url>https://www.oxygenxml.com/maven</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>sonatype-releases</id>
            <url>https://oss.sonatype.org/content/repositories/releases</url>
        </pluginRepository>
        <pluginRepository>
            <id>clojars.org</id>
            <url>https://clojars.org/repo</url>
        </pluginRepository>
    </pluginRepositories>

</project>
