currency-converter
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>com.posadskiy</groupId>
<artifactId>currency-converter</artifactId>
<version>1.4.0</version>
</dependency><?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>com.posadskiy</groupId>
<artifactId>currency-converter</artifactId>
<version>1.4.0</version>
<packaging>jar</packaging>
<name>Currency Converter</name>
<description>Open Source Java library for real-time currency exchange rates. Zero dependencies. Supports 165+ currencies via multiple providers with automatic failover.</description>
<url>https://github.com/posadskiy/currency-converter</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/MIT</url>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/posadskiy/currency-converter</connection>
<developerConnection>scm:git:https://github.com/posadskiy/currency-converter</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/posadskiy/currency-converter</url>
</scm>
<developers>
<developer>
<name>Dimitri Posadskiy</name>
<email>dmitry.posadsky@gmail.com</email>
<url>https://posadskiy.com</url>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Base bytecode targets Java 8 so customers on any JDK 8+ can use this library. -->
<maven.compiler.release>8</maven.compiler.release>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>6.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>6.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.27.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.6.2</version>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.9,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[21,)</version>
<message>JDK 21+ is required to compile all MR-JAR layers (Java 8, 11, 21).</message>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!--
Multi-Release JAR configuration.
Three compilation passes:
1. default-compile : base classes compiled to Java 8 bytecode
2. compile-java11 : src/main/java11 compiled to Java 11,
output to META-INF/versions/11
(uses java.net.http.HttpClient)
3. compile-java21 : src/main/java21 compiled to Java 21,
output to META-INF/versions/21
(uses virtual threads + parallel source queries)
At runtime the JVM picks the highest versioned directory it supports.
Java 8 users load only the base classes.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<executions>
<!-- Pass 1: base Java 8 layer (default execution) -->
<execution>
<id>default-compile</id>
<configuration>
<release>8</release>
</configuration>
</execution>
<!-- Pass 2: Java 11 layer — HttpClient-based NetworkUtils -->
<execution>
<id>compile-java11</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>11</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
</compileSourceRoots>
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/11</outputDirectory>
</configuration>
</execution>
<!-- Pass 3: Java 21 layer — virtual-thread CurrencyConvertService -->
<execution>
<id>compile-java21</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>21</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java21</compileSourceRoot>
</compileSourceRoots>
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/21</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Mark the JAR as a Multi-Release JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
<Automatic-Module-Name>com.posadskiy.currencyconverter</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.4.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.12.0</version>
<configuration>
<source>8</source>
<detectJavaApiLink>false</detectJavaApiLink>
<doclint>none</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<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.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.14</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!--
MR-JAR: base layer and versioned layer classes have the same FQCNs.
Unit tests run from target/classes (directory classpath), so the MR override
classes under META-INF/versions are typically not selected.
Exclude versioned classes from JaCoCo report generation to avoid
duplicate-class collisions and to measure what unit tests actually execute.
-->
<excludes>
<exclude>META-INF/versions/**</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.5</version>
<configuration>
<useModulePath>false</useModulePath>
</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.2.4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>