<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>de.haumacher</groupId>
    <artifactId>auto-translate-parent</artifactId>
    <version>1.1.2</version>
  </parent>

  <artifactId>auto-translate</artifactId>
  <packaging>jar</packaging>

  <name>Auto Translate Core Library</name>
  <description>Core library for automatic translation of HTML templates and ARB (Application Resource Bundle) files using DeepL API</description>

  <dependencies>
		<dependency>
		  <groupId>com.deepl.api</groupId>
		  <artifactId>deepl-java</artifactId>
		  <version>1.9.0</version>
		</dependency>
		<dependency>
		  <groupId>com.google.code.gson</groupId>
		  <artifactId>gson</artifactId>
		  <version>2.10.1</version>
		</dependency>
		<dependency>
		    <groupId>org.junit.jupiter</groupId>
		    <artifactId>junit-jupiter</artifactId>
		    <version>5.11.1</version>
		    <scope>test</scope>
		</dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <release>17</release>
        </configuration>
      </plugin>
		<plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-resources-plugin</artifactId>
		  <version>3.3.0</version>
		</plugin>
		<plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-surefire-plugin</artifactId>
		  <version>3.0.0-M9</version>
		</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.6.3</version>
		  <executions>
		    <execution>
		      <id>attach-javadocs</id>
		      <goals>
		        <goal>jar</goal>
		      </goals>
		    </execution>
		  </executions>
		  <configuration>
		    <doclint>none</doclint>
		  </configuration>
		</plugin>
		<plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-release-plugin</artifactId>
		  <version>3.0.1</version>
		  <configuration>
		    <autoVersionSubmodules>true</autoVersionSubmodules>
		    <useReleaseProfile>false</useReleaseProfile>
		    <releaseProfiles>release</releaseProfiles>
		    <goals>deploy</goals>
		    <tagNameFormat>v@{project.version}</tagNameFormat>
		  </configuration>
		</plugin>

			<!-- Deploying to Maven Central -->
			<plugin>
				<groupId>org.sonatype.central</groupId>
				<artifactId>central-publishing-maven-plugin</artifactId>
				<version>0.6.0</version>
				<extensions>true</extensions>
				<configuration>
					<publishingServerId>central</publishingServerId>
					<autoPublish>true</autoPublish>
					<waitUntil>published</waitUntil>
				</configuration>
			</plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>${gpg.keyname}</keyname>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>