Files
JUnit_Tutorials/extendwith/pom.xml
T
2026-11-06 21:43:57 +05:30

83 lines
2.9 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ankurm</groupId>
<artifactId>extendwith</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>extendwith</name>
<description>JUnit @ExtendWith and the Jupiter extension model: first extensions, registration, ordering. JUnit 6.1.3 by default, JUnit 5.14.4 via -Pjunit5.</description>
<properties>
<maven.compiler.release>25</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>6.1.3</junit.version>
<!-- JUnit 5 numbers the Platform 1.x, JUnit 6 numbers it 6.x -->
<junit.platform.version>6.1.3</junit.platform.version>
<extendwith.output>output</extendwith.output>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!-- the tests start the JUnit Platform themselves (Runner), so the launcher API is on the compile classpath -->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.24.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.27.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<!-- same sources, JUnit 5 latest: mvn -Pjunit5 test (writes output/junit5/ instead of output/) -->
<profile>
<id>junit5</id>
<properties>
<junit.version>5.14.4</junit.version>
<junit.platform.version>1.14.4</junit.platform.version>
<extendwith.output>output/junit5</extendwith.output>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<!-- fixtures are test classes that are meant to fail or abort: only Runner runs them -->
<excludes>
<exclude>**/fixtures/**</exclude>
</excludes>
<useManifestOnlyJar>false</useManifestOnlyJar>
<systemPropertyVariables>
<extendwith.output>${extendwith.output}</extendwith.output>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>