<?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>org.somda.sdc</groupId>
    <artifactId>sdc-ri-model</artifactId>
    <packaging>pom</packaging>
    <version>5.0.0</version>

    <name>SDC Reference Implementation Model</name>
    <description>
        SDCri Model provides the data model used by the SDC Reference Implementation conforming
        with the IEEE 11073 SDC specifications.
    </description>
    <url>http://www.somda.org</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>David Gregorczyk</name>
            <email>david.gregorczyk@web.de</email>
            <organizationUrl>https://gitlab.com/d.gregorczyk</organizationUrl>
        </developer>
        <developer>
            <name>Lukas Deichmann</name>
            <email>lukasdeichmann@gmail.com</email>
            <organizationUrl>https://gitlab.com/ldeichmann</organizationUrl>
        </developer>
        <developer>
            <name>Malte Grebe-Lüth</name>
            <email>malte.grebe@gmx.de</email>
            <organizationUrl>https://gitlab.com/grebem</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://gitlab.com/sdc-suite/sdc-ri-model.git</connection>
        <developerConnection>scm:git:git://gitlab.com/sdc-suite/sdc-ri-model.git</developerConnection>
        <url>https://gitlab.com/sdc-suite/sdc-ri-model/-/tree/main</url>
      <tag>sdc-ri-model-5.0.0</tag>
  </scm>

    <modules>
        <module>common-model</module>
        <module>dpws-model</module>
        <module>biceps-model-plugins</module>
        <module>biceps-model</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jaxbBasicsVersion>0.13.1</jaxbBasicsVersion>
        <log4j2Version>2.19.0</log4j2Version>
        <junitVersion>5.8.2</junitVersion>
        <junitPlatformVersion>1.8.2</junitPlatformVersion>
        <jaxbImplVersion>2.3.6</jaxbImplVersion>
        <jaxbXJCVersion>2.3.6</jaxbXJCVersion>
        <jaxbRuntimeVersion>2.3.6</jaxbRuntimeVersion>
        <jaxbCoreVersion>2.3.0.1</jaxbCoreVersion>
        <jaxbApiVersion>2.3.1</jaxbApiVersion>
        <jaxb2MavenPluginVersion>0.15.1</jaxb2MavenPluginVersion>
        <jaxbThreetenCoreVersion>1.2</jaxbThreetenCoreVersion>
        <jaxbBuildHelperMavenPluginVersion>3.3.0</jaxbBuildHelperMavenPluginVersion>
        <mavenJarPluginVersion>3.3.0</mavenJarPluginVersion>
        <mavenCompilerPluginVersion>3.11.0</mavenCompilerPluginVersion>
        <mavenSitePluginVersion>3.12.1</mavenSitePluginVersion>
        <guiceVersion>5.1.0</guiceVersion>
        <bouncyCastleVersion>1.75</bouncyCastleVersion>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mavenCompilerPluginVersion}</version>
                <configuration>
                    <release>11</release>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.5.0</version>
                <configuration>
                    <source>11</source>
                    <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalOptions>-Xdoclint:none</additionalOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.1.2</version>
            </plugin>

            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>${mavenSitePluginVersion}</version>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals><goal>create</goal></goals>
                    </execution>
                </executions>
                <configuration>
                    <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
                    <shortRevisionLength>8</shortRevisionLength>
                    <attach>true</attach>
                    <addOutputDirectoryToResources>true</addOutputDirectoryToResources>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${mavenJarPluginVersion}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                        <manifestEntries>
                            <Build-Time>${maven.build.timestamp}</Build-Time>
                        </manifestEntries>
                        <manifestSections>
                            <manifestSection>
                                <name>Versions</name>
                                <manifestEntries>
                                    <Implementation-Version>${project.version}</Implementation-Version>
                                    <Implementation-SCM-Revision>${buildNumber}</Implementation-SCM-Revision>
                                    <Implementation-SCM-Branch>${scmBranch}</Implementation-SCM-Branch>
                                </manifestEntries>
                            </manifestSection>
                        </manifestSections>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <pushChanges>false</pushChanges>
                </configuration>
            </plugin>

        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>4.7.0.0</version>
                    <dependencies>
                        <!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
                        <dependency>
                            <groupId>com.github.spotbugs</groupId>
                            <artifactId>spotbugs</artifactId>
                            <version>4.7.1</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <includeTests>true</includeTests>
                    </configuration>
                </plugin>

                <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-checkstyle-plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.2</version>
                    <configuration>
                        <configLocation>checkstyle.xml</configLocation>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.30</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>${mavenSitePluginVersion}</version>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <!-- This is necessary for gpg to not try to use the pinentry programs -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <name>SDCri releases</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <name>SDCri snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

</project>