Files
java-interview-lab/hashmap-vs-concurrenthashmap/pom.xml
T

64 lines
2.3 KiB
XML

<?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.ankurm.interviewlab</groupId>
<artifactId>hashmap-vs-concurrenthashmap</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>java-interview-lab :: hashmap-vs-concurrenthashmap</name>
<description>
Runnable companion code for ankurm.com's "HashMap vs ConcurrentHashMap in Java" article:
reflective dumps of JDK 25 internals (sizeCtl, treeification), a forced-interleaving lost
update, a measured multi-thread lost-update run, and the computeIfAbsent recursion traps.
</description>
<properties>
<maven.compiler.release>25</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>6.1.3</junit.version>
<!-- Tests reflect into java.util.HashMap and java.util.concurrent.ConcurrentHashMap private
fields; JPMS refuses setAccessible(true) on them without these two flags. -->
<opens>--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED</opens>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<argLine>${opens} -Xmx512m -Duser.timezone=UTC -Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>