<?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.openscience.cdk</groupId>
  <artifactId>cdkdepict</artifactId>
  <version>1.14</version>
  <modules>
    <module>cdkdepict-lib</module>
    <!-- <module>cdkdepict-webapp</module> -->
  </modules>
  <packaging>pom</packaging>
  <name>cdkdepict</name>
  <description>SMILES depiction WebApp</description>
  <url>http://github.com/cdk/cdkdepict</url>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <cdk.version>2.12</cdk.version>
    <depict.version>${project.parent.version}</depict.version>
    <junit.version>5.14.3</junit.version>
    <hamcrest.version>2.2</hamcrest.version>
    <!-- Note -Pjakarta for Spring 6 (Requires Java 17 and JakartaEE) -->
    <spring-webmvc.version>5.3.39</spring-webmvc.version>
    <spring-boot.version>2.7.18</spring-boot.version>
  </properties>
  <developers>
    <developer>
      <name>John Mayfield</name>
      <url>http://www.github.com/johnmay/</url>
      <timezone>GMT</timezone>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>GNU LGPL 2.1 or later</name>
      <url>http://www.gnu.org/licenses/lgpl.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>https://github.com/cdk/cdk</url>
    <connection>scm:git:git://github.com/cdk/cdk.git</connection>
    <developerConnection>scm:git:git@github.com:cdk/cdk.git
    </developerConnection>
  </scm>
  <issueManagement>
    <url>https://github.com/cdk/depict/issues</url>
    <system>GitHub</system>
  </issueManagement>
  <distributionManagement>
      <snapshotRepository>
          <id>central</id>
          <url>https://central.sonatype.com/repository/maven-snapshots/</url>
      </snapshotRepository>
      <repository>
          <id>central</id>
          <url>https://central.sonatype.com/</url>
          <layout>default</layout>
      </repository>
      <!-- site is staged and then copied to a sub-folder of gh-pages, no
           url is provided but the field is needed to stage the site. -->
      <site>
          <id>cdk.github.com</id>
          <url>https://cdk.github.io/cdk/</url>
      </site>
  </distributionManagement>    
  <repositories>
    <repository>
      <id>central-snapshot</id>
      <url>https://central.sonatype.com/repository/maven-snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <build>
    <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>
    </plugins>
  </build>
  <dependencyManagement>
    <dependencies>
	  <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>${junit.version}</version>
        <type>jar</type>
        <scope>test</scope>
      </dependency>
	  <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-library</artifactId>
        <version>${hamcrest.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring-webmvc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openscience.cdk</groupId>
        <artifactId>cdk-atomtype</artifactId>
        <version>${cdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openscience.cdk</groupId>
        <artifactId>cdk-standard</artifactId>
        <version>${cdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openscience.cdk</groupId>
        <artifactId>cdk-io</artifactId>
        <version>${cdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openscience.cdk</groupId>
        <artifactId>cdk-ioformats</artifactId>
        <version>${cdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openscience.cdk</groupId>
        <artifactId>cdk-isomorphism</artifactId>
        <version>${cdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openscience.cdk</groupId>
        <artifactId>cdk-smiles</artifactId>
        <version>${cdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openscience.cdk</groupId>
        <artifactId>cdk-silent</artifactId>
        <version>${cdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openscience.cdk</groupId>
        <artifactId>cdk-interfaces</artifactId>
        <version>${cdk.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openscience.cdk</groupId>
        <artifactId>cdk-ctab</artifactId>
        <version>${cdk.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <profiles>
    <profile>
      <id>jakarta</id>
      <properties>
        <spring-webmvc.version>6.2.1</spring-webmvc.version>
        <spring-boot.version>3.4.1</spring-boot.version>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
              <webXml>src/main/webapp/WEB-INF/web-jakarta.xml</webXml>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.2</version>
            <configuration>
              <source>17</source>
              <target>17</target>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>ossrh</id>
      <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.9.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <executable>gpg</executable>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                    <passphrase>${gpg.passphrase}</passphrase>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</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.3.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
    </profile>
  </profiles>
</project>
